@rufous/ui 0.3.28 → 0.3.29
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/main.cjs +5 -0
- package/dist/main.js +5 -0
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -9975,6 +9975,11 @@ function SmartSelect({
|
|
|
9975
9975
|
const key = getValue(value);
|
|
9976
9976
|
if (!base.some((o) => getValue(o) === key)) base = [value, ...base];
|
|
9977
9977
|
}
|
|
9978
|
+
if (multiple && Array.isArray(value) && value.length > 0) {
|
|
9979
|
+
const baseKeys = new Set(base.map((o) => getValue(o)));
|
|
9980
|
+
const missing = value.filter((v) => !baseKeys.has(getValue(v)));
|
|
9981
|
+
if (missing.length > 0) base = [...base, ...missing];
|
|
9982
|
+
}
|
|
9978
9983
|
return base;
|
|
9979
9984
|
}, [flatOptionsList, searchResults, getValue, value, multiple]);
|
|
9980
9985
|
const depthMap = (0, import_react51.useMemo)(() => {
|
package/dist/main.js
CHANGED
|
@@ -9901,6 +9901,11 @@ function SmartSelect({
|
|
|
9901
9901
|
const key = getValue(value);
|
|
9902
9902
|
if (!base.some((o) => getValue(o) === key)) base = [value, ...base];
|
|
9903
9903
|
}
|
|
9904
|
+
if (multiple && Array.isArray(value) && value.length > 0) {
|
|
9905
|
+
const baseKeys = new Set(base.map((o) => getValue(o)));
|
|
9906
|
+
const missing = value.filter((v) => !baseKeys.has(getValue(v)));
|
|
9907
|
+
if (missing.length > 0) base = [...base, ...missing];
|
|
9908
|
+
}
|
|
9904
9909
|
return base;
|
|
9905
9910
|
}, [flatOptionsList, searchResults, getValue, value, multiple]);
|
|
9906
9911
|
const depthMap = useMemo3(() => {
|