@oliasoft-open-source/react-ui-library 4.15.1-beta-6 → 4.15.1-beta-7
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 +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20890,6 +20890,11 @@ const Trigger = ({
|
|
|
20890
20890
|
}) => {
|
|
20891
20891
|
var _a2;
|
|
20892
20892
|
const [inputRef, setInputFocus] = useFocus();
|
|
20893
|
+
useEffect(() => {
|
|
20894
|
+
if (isOpen2 && typeof setInputFocus === "function") {
|
|
20895
|
+
setInputFocus();
|
|
20896
|
+
}
|
|
20897
|
+
}, [isOpen2, setInputFocus]);
|
|
20893
20898
|
const hasSelection2 = Array.isArray(selectedOptions) ? selectedOptions.length > 0 && ((_a2 = selectedOptions[0]) == null ? void 0 : _a2.value) : selectedOptions == null ? void 0 : selectedOptions.value;
|
|
20894
20899
|
const canClear = clearable && hasSelection2;
|
|
20895
20900
|
const order2 = (() => {
|
|
@@ -20928,14 +20933,7 @@ const Trigger = ({
|
|
|
20928
20933
|
right2 ? styles$m.right : "",
|
|
20929
20934
|
order2
|
|
20930
20935
|
),
|
|
20931
|
-
onClick:
|
|
20932
|
-
onClickTrigger(evt);
|
|
20933
|
-
if (typeof setInputFocus === "function") {
|
|
20934
|
-
setTimeout(() => {
|
|
20935
|
-
setInputFocus();
|
|
20936
|
-
}, 0);
|
|
20937
|
-
}
|
|
20938
|
-
},
|
|
20936
|
+
onClick: onClickTrigger,
|
|
20939
20937
|
onFocus,
|
|
20940
20938
|
onBlur,
|
|
20941
20939
|
"data-error": error2 || null,
|