@rc-component/select 1.1.0 → 1.1.1

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
@@ -203,7 +203,10 @@ const OptionList = (_, ref) => {
203
203
  {
204
204
  // value
205
205
  const item = memoFlattenOptions[activeIndex];
206
- if (item && !item?.data?.disabled && !overMaxCount) {
206
+ if (!item || item.data.disabled) {
207
+ return onSelectValue(undefined);
208
+ }
209
+ if (!overMaxCount || rawValues.has(item.value)) {
207
210
  onSelectValue(item.value);
208
211
  } else {
209
212
  onSelectValue(undefined);
package/lib/OptionList.js CHANGED
@@ -211,7 +211,10 @@ const OptionList = (_, ref) => {
211
211
  {
212
212
  // value
213
213
  const item = memoFlattenOptions[activeIndex];
214
- if (item && !item?.data?.disabled && !overMaxCount) {
214
+ if (!item || item.data.disabled) {
215
+ return onSelectValue(undefined);
216
+ }
217
+ if (!overMaxCount || rawValues.has(item.value)) {
215
218
  onSelectValue(item.value);
216
219
  } else {
217
220
  onSelectValue(undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/select",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "React Select",
5
5
  "engines": {
6
6
  "node": ">=8.x"