cr-ui-lib 1.1.113 → 1.1.114
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 +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3628,8 +3628,12 @@ function SingleSelectDropdown({
|
|
|
3628
3628
|
setIsOpen(!isOpen);
|
|
3629
3629
|
}
|
|
3630
3630
|
};
|
|
3631
|
+
const hasMounted = React.useRef(false);
|
|
3632
|
+
React.useEffect(() => {
|
|
3633
|
+
hasMounted.current = true;
|
|
3634
|
+
}, []);
|
|
3631
3635
|
const openList = () => {
|
|
3632
|
-
if (!disabled) {
|
|
3636
|
+
if (!disabled && !isOpen && hasMounted.current) {
|
|
3633
3637
|
setIsOpen(true);
|
|
3634
3638
|
}
|
|
3635
3639
|
};
|
|
@@ -3837,7 +3841,6 @@ function SingleSelectDropdown({
|
|
|
3837
3841
|
"input",
|
|
3838
3842
|
{
|
|
3839
3843
|
type: "text",
|
|
3840
|
-
autoFocus: true,
|
|
3841
3844
|
onClick: openList,
|
|
3842
3845
|
onFocus: openList,
|
|
3843
3846
|
className: tailwindMerge.twMerge(
|