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
2 changes: 1 addition & 1 deletion src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import SelectContext from './SelectContext';
import type { SelectContextProps } from './SelectContext';
import useCache from './hooks/useCache';
import useFilterOptions from './hooks/useFilterOptions';
import useId from './hooks/useId';
import useId from '@rc-component/util/lib/hooks/useId';
import useOptions from './hooks/useOptions';
import useRefFunc from './hooks/useRefFunc';
import type { FlattenOptionData } from './interface';
Expand Down
32 changes: 0 additions & 32 deletions src/hooks/useId.ts

This file was deleted.

12 changes: 6 additions & 6 deletions tests/__snapshots__/Combobox.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ exports[`Select.Combobox renders controlled correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down Expand Up @@ -52,13 +52,13 @@ exports[`Select.Combobox renders correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down
24 changes: 12 additions & 12 deletions tests/__snapshots__/Multiple.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ exports[`Select.Multiple max tag render not display maxTagPlaceholder if maxTagC
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
readonly=""
role="combobox"
style="opacity: 0;"
Expand Down Expand Up @@ -147,13 +147,13 @@ exports[`Select.Multiple max tag render truncates tags by maxTagCount and show m
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
readonly=""
role="combobox"
style="opacity: 0;"
Expand Down Expand Up @@ -269,13 +269,13 @@ exports[`Select.Multiple max tag render truncates tags by maxTagCount and show m
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
readonly=""
role="combobox"
style="opacity: 0;"
Expand Down Expand Up @@ -374,13 +374,13 @@ exports[`Select.Multiple max tag render truncates values by maxTagTextLength 1`]
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
readonly=""
role="combobox"
style="opacity: 0;"
Expand Down
56 changes: 28 additions & 28 deletions tests/__snapshots__/Select.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ exports[`Select.Basic does not filter when filterOption value is false 1`] = `
>
<div>
<div
id="rc_select_TEST_OR_SSR_list"
id="test-id_list"
role="listbox"
style="height: 0px; width: 0px; overflow: hidden;"
>
<div
aria-label="1"
aria-selected="false"
id="rc_select_TEST_OR_SSR_list_0"
id="test-id_list_0"
role="option"
>
1
</div>
<div
aria-label="2"
aria-selected="false"
id="rc_select_TEST_OR_SSR_list_1"
id="test-id_list_1"
role="option"
>
2
Expand Down Expand Up @@ -99,7 +99,7 @@ exports[`Select.Basic filterOption could be true as described in default value 1
<div>
<div
class="rc-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
id="test-id_list"
role="listbox"
>
Not Found
Expand All @@ -123,13 +123,13 @@ exports[`Select.Basic no search 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="rc-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
readonly=""
role="combobox"
style="opacity: 0;"
Expand Down Expand Up @@ -166,15 +166,15 @@ exports[`Select.Basic render renders aria-attributes correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-label="some-label"
aria-labelledby="test-id"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="antd-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down Expand Up @@ -218,13 +218,13 @@ exports[`Select.Basic render renders correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="antd-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down Expand Up @@ -270,13 +270,13 @@ exports[`Select.Basic render renders data-attributes correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="antd-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down Expand Up @@ -320,14 +320,14 @@ exports[`Select.Basic render renders disabled select correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="antd-selection-search-input"
disabled=""
id="rc_select_TEST_OR_SSR"
id="test-id"
role="combobox"
type="search"
value=""
Expand Down Expand Up @@ -362,13 +362,13 @@ exports[`Select.Basic render renders role prop correctly 1`] = `
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-controls="test-id_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
aria-owns="test-id_list"
autocomplete="off"
class="antd-selection-search-input"
id="rc_select_TEST_OR_SSR"
id="test-id"
role="button"
type="search"
value=""
Expand Down Expand Up @@ -545,22 +545,22 @@ exports[`Select.Basic should contain falsy children 1`] = `
>
<div>
<div
id="rc_select_TEST_OR_SSR_list"
id="test-id_list"
role="listbox"
style="height: 0px; width: 0px; overflow: hidden;"
>
<div
aria-label="1"
aria-selected="true"
id="rc_select_TEST_OR_SSR_list_0"
id="test-id_list_0"
role="option"
>
1
</div>
<div
aria-label="2"
aria-selected="false"
id="rc_select_TEST_OR_SSR_list_1"
id="test-id_list_1"
role="option"
>
2
Expand Down Expand Up @@ -644,22 +644,22 @@ exports[`Select.Basic should render custom dropdown correctly 1`] = `
CUSTOM NODE
</div>
<div
id="rc_select_TEST_OR_SSR_list"
id="test-id_list"
role="listbox"
style="height: 0px; width: 0px; overflow: hidden;"
>
<div
aria-label="1"
aria-selected="false"
id="rc_select_TEST_OR_SSR_list_0"
id="test-id_list_0"
role="option"
>
1
</div>
<div
aria-label="2"
aria-selected="false"
id="rc_select_TEST_OR_SSR_list_1"
id="test-id_list_1"
role="option"
>
2
Expand Down
Loading
Loading