@kne/super-select 0.1.44 → 0.1.45
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/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1012,7 +1012,8 @@ const SelectList = React.forwardRef((_ref, ref) => {
|
|
|
1012
1012
|
return;
|
|
1013
1013
|
}
|
|
1014
1014
|
if (single) {
|
|
1015
|
-
|
|
1015
|
+
// 筛选场景:再次点击已选项视为清空,否则单选无法清除
|
|
1016
|
+
setValue(isChecked ? [] : [item]);
|
|
1016
1017
|
} else {
|
|
1017
1018
|
onSelect(item);
|
|
1018
1019
|
}
|
|
@@ -1624,7 +1625,8 @@ const SelectTree = React.forwardRef((_ref2, ref) => {
|
|
|
1624
1625
|
return;
|
|
1625
1626
|
}
|
|
1626
1627
|
if (single) {
|
|
1627
|
-
|
|
1628
|
+
// 筛选场景:再次点击已选项视为清空,否则单选无法清除
|
|
1629
|
+
setValue(isChecked ? [] : [item]);
|
|
1628
1630
|
} else {
|
|
1629
1631
|
onSelect(item);
|
|
1630
1632
|
}
|