cr-ui-lib 1.1.99 → 1.1.101
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 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3578,11 +3578,13 @@ function SingleSelectDropdown({
|
|
|
3578
3578
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3579
3579
|
}, []);
|
|
3580
3580
|
React.useEffect(() => {
|
|
3581
|
-
if (isOpen && searchTerm
|
|
3581
|
+
if (!isOpen && searchTerm) {
|
|
3582
3582
|
setSearchTerm("");
|
|
3583
|
-
onSearch
|
|
3583
|
+
if (onSearch) {
|
|
3584
|
+
onSearch("");
|
|
3585
|
+
}
|
|
3584
3586
|
}
|
|
3585
|
-
}, [isOpen]);
|
|
3587
|
+
}, [isOpen, searchTerm, onSearch]);
|
|
3586
3588
|
const updatePosition = React.useCallback(() => {
|
|
3587
3589
|
if (dropdownRef.current && usePortal && isOpen) {
|
|
3588
3590
|
const rect = dropdownRef.current.getBoundingClientRect();
|
|
@@ -3823,7 +3825,7 @@ function SingleSelectDropdown({
|
|
|
3823
3825
|
autoFocus: true,
|
|
3824
3826
|
onClick: openList,
|
|
3825
3827
|
className: tailwindMerge.twMerge(
|
|
3826
|
-
"input-placeholder-ellipsis w-full pr-[30px] h-[
|
|
3828
|
+
"input-placeholder-ellipsis w-full pr-[30px] h-[48px] px-2 py-1 rounded-md border border-gray-300 text-sm focus:border-1 focus:border-[#4683B4] focus:outline-none",
|
|
3827
3829
|
searchInputClass,
|
|
3828
3830
|
uniqueSearch && "placeholder:opacity-100 placeholder:text-[#131414]"
|
|
3829
3831
|
),
|