@rc-component/select 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/OptionList.js CHANGED
@@ -351,7 +351,7 @@ const OptionList = (_, ref) => {
351
351
  optionTitle = title;
352
352
  }
353
353
  return /*#__PURE__*/React.createElement("div", _extends({}, pickAttrs(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
354
- "aria-selected": isAriaSelected(value),
354
+ "aria-selected": virtual ? undefined : isAriaSelected(value),
355
355
  className: optionClassName,
356
356
  title: optionTitle,
357
357
  onMouseMove: () => {
package/es/Select.js CHANGED
@@ -60,6 +60,12 @@ const Select = /*#__PURE__*/React.forwardRef((props, ref) => {
60
60
  fieldNames,
61
61
  // Search
62
62
  showSearch,
63
+ searchValue: legacySearchValue,
64
+ onSearch: legacyOnSearch,
65
+ autoClearSearchValue: legacyAutoClearSearchValue,
66
+ filterOption: legacyFilterOption,
67
+ optionFilterProp: legacyOptionFilterProp,
68
+ filterSort: legacyFilterSort,
63
69
  // Select
64
70
  onSelect,
65
71
  onDeselect,
@@ -86,7 +92,15 @@ const Select = /*#__PURE__*/React.forwardRef((props, ref) => {
86
92
  styles,
87
93
  ...restProps
88
94
  } = props;
89
- const [mergedShowSearch, searchConfig] = useSearchConfig(showSearch, props);
95
+ const searchProps = {
96
+ searchValue: legacySearchValue,
97
+ onSearch: legacyOnSearch,
98
+ autoClearSearchValue: legacyAutoClearSearchValue,
99
+ filterOption: legacyFilterOption,
100
+ optionFilterProp: legacyOptionFilterProp,
101
+ filterSort: legacyFilterSort
102
+ };
103
+ const [mergedShowSearch, searchConfig] = useSearchConfig(showSearch, searchProps);
90
104
  const {
91
105
  filterOption,
92
106
  searchValue,
@@ -1,2 +1,2 @@
1
- import type { SearchConfig, DefaultOptionType, SelectProps } from "../Select";
2
- export default function useSearchConfig(showSearch: boolean | SearchConfig<DefaultOptionType> | undefined, props: SelectProps): [boolean, SearchConfig<DefaultOptionType>];
1
+ import type { SearchConfig, DefaultOptionType } from "../Select";
2
+ export default function useSearchConfig(showSearch: boolean | SearchConfig<DefaultOptionType> | undefined, props: SearchConfig<DefaultOptionType>): [boolean, SearchConfig<DefaultOptionType>];
package/lib/OptionList.js CHANGED
@@ -359,7 +359,7 @@ const OptionList = (_, ref) => {
359
359
  optionTitle = title;
360
360
  }
361
361
  return /*#__PURE__*/React.createElement("div", _extends({}, (0, _pickAttrs.default)(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
362
- "aria-selected": isAriaSelected(value),
362
+ "aria-selected": virtual ? undefined : isAriaSelected(value),
363
363
  className: optionClassName,
364
364
  title: optionTitle,
365
365
  onMouseMove: () => {
package/lib/Select.js CHANGED
@@ -67,6 +67,12 @@ const Select = /*#__PURE__*/React.forwardRef((props, ref) => {
67
67
  fieldNames,
68
68
  // Search
69
69
  showSearch,
70
+ searchValue: legacySearchValue,
71
+ onSearch: legacyOnSearch,
72
+ autoClearSearchValue: legacyAutoClearSearchValue,
73
+ filterOption: legacyFilterOption,
74
+ optionFilterProp: legacyOptionFilterProp,
75
+ filterSort: legacyFilterSort,
70
76
  // Select
71
77
  onSelect,
72
78
  onDeselect,
@@ -93,7 +99,15 @@ const Select = /*#__PURE__*/React.forwardRef((props, ref) => {
93
99
  styles,
94
100
  ...restProps
95
101
  } = props;
96
- const [mergedShowSearch, searchConfig] = (0, _useSearchConfig.default)(showSearch, props);
102
+ const searchProps = {
103
+ searchValue: legacySearchValue,
104
+ onSearch: legacyOnSearch,
105
+ autoClearSearchValue: legacyAutoClearSearchValue,
106
+ filterOption: legacyFilterOption,
107
+ optionFilterProp: legacyOptionFilterProp,
108
+ filterSort: legacyFilterSort
109
+ };
110
+ const [mergedShowSearch, searchConfig] = (0, _useSearchConfig.default)(showSearch, searchProps);
97
111
  const {
98
112
  filterOption,
99
113
  searchValue,
@@ -1,2 +1,2 @@
1
- import type { SearchConfig, DefaultOptionType, SelectProps } from "../Select";
2
- export default function useSearchConfig(showSearch: boolean | SearchConfig<DefaultOptionType> | undefined, props: SelectProps): [boolean, SearchConfig<DefaultOptionType>];
1
+ import type { SearchConfig, DefaultOptionType } from "../Select";
2
+ export default function useSearchConfig(showSearch: boolean | SearchConfig<DefaultOptionType> | undefined, props: SearchConfig<DefaultOptionType>): [boolean, SearchConfig<DefaultOptionType>];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/select",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "React Select",
5
5
  "engines": {
6
6
  "node": ">=8.x"