Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rc-component/tree-select",
"version": "1.11.0",
"version": "1.12.0",
"description": "tree-select ui component for react",
"keywords": [
"react",
Expand Down Expand Up @@ -43,7 +43,7 @@
"*": "prettier --write --ignore-unknown"
},
"dependencies": {
"@rc-component/select": "~1.8.0",
"@rc-component/select": "~1.9.0",
"@rc-component/tree": "~1.3.2",
"@rc-component/util": "^1.11.1",
"clsx": "^2.1.1"
Expand Down
4 changes: 2 additions & 2 deletions tests/Select.checkable.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ describe('TreeSelect.checkable', () => {
selectNode(0);
search(container, 'foo');

// Clear all using mouseDown (same as wrapper.clearAll())
// Clear all using click (same as wrapper.clearAll())
const clearButton = container.querySelector('.rc-tree-select-clear')!;
fireEvent.mouseDown(clearButton);
fireEvent.click(clearButton);

// Check that no items are selected
expect(container.querySelectorAll('.rc-tree-select-selection-item')).toHaveLength(0);
Expand Down
2 changes: 0 additions & 2 deletions tests/__snapshots__/Select.checkable.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ exports[`TreeSelect.checkable uncheck remove by selector not treeCheckStrictly 2
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
</div>
<div
Expand Down Expand Up @@ -776,7 +775,6 @@ exports[`TreeSelect.checkable uncheck remove by tree check 2`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
</div>
<div
Expand Down
1 change: 0 additions & 1 deletion tests/__snapshots__/Select.multiple.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exports[`TreeSelect.multiple can hide search box by showSearch = false 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
</div>
<div
Expand Down
9 changes: 1 addition & 8 deletions tests/__snapshots__/Select.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exports[`TreeSelect.basic render renders TreeNode correctly 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
<input
aria-autocomplete="list"
Expand Down Expand Up @@ -38,7 +37,6 @@ exports[`TreeSelect.basic render renders TreeNode correctly with falsy child 1`]
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
<input
aria-autocomplete="list"
Expand Down Expand Up @@ -72,7 +70,6 @@ exports[`TreeSelect.basic render renders correctly 1`] = `
>
<div
class="awesome-placeholder"
style="visibility: visible;"
/>
</div>
<div
Expand Down Expand Up @@ -106,7 +103,6 @@ exports[`TreeSelect.basic render renders disabled correctly 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
<input
aria-autocomplete="list"
Expand Down Expand Up @@ -139,7 +135,6 @@ exports[`TreeSelect.basic render renders tree correctly 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
</div>
<div
Expand Down Expand Up @@ -381,7 +376,6 @@ exports[`TreeSelect.basic render renders treeDataSimpleMode correctly 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
<input
aria-autocomplete="list"
Expand Down Expand Up @@ -636,7 +630,7 @@ exports[`TreeSelect.basic search nodes check tree changed by filter 2`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
style=""
/>
<input
aria-autocomplete="list"
Expand Down Expand Up @@ -913,7 +907,6 @@ exports[`TreeSelect.basic search nodes renders search input 1`] = `
>
<div
class="rc-tree-select-placeholder"
style="visibility: visible;"
/>
<input
aria-autocomplete="list"
Expand Down
2 changes: 1 addition & 1 deletion tests/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function clearSelection(element: HTMLElement, index = 0) {
}

export function clearAll(element: HTMLElement) {
fireEvent.mouseDown(element.querySelector('.rc-tree-select-clear')!);
fireEvent.click(element.querySelector('.rc-tree-select-clear')!);
}

export function getSelections(element: HTMLElement = document.body) {
Expand Down
Loading