react-better-html 1.1.226 → 1.1.228
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 +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3608,6 +3608,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
3608
3608
|
const onChangeValue = useCallback8(
|
|
3609
3609
|
(newValue) => {
|
|
3610
3610
|
setSearchQuery(newValue);
|
|
3611
|
+
setIsOpen.setTrue();
|
|
3611
3612
|
if (withDebounce) setDebouncedSearchQuery(newValue);
|
|
3612
3613
|
else onChangeSearch?.(newValue);
|
|
3613
3614
|
},
|
|
@@ -7373,8 +7374,8 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
|
|
|
7373
7374
|
const toBeOpened = item.children.some(
|
|
7374
7375
|
(child) => child.href ? location.pathname === "/" ? location.pathname === child.href : location.pathname.startsWith(child.href) && child.href !== "/" : false
|
|
7375
7376
|
);
|
|
7376
|
-
setIsOpened.setState(toBeOpened);
|
|
7377
|
-
}, [item]);
|
|
7377
|
+
if (!isCollapsed) setIsOpened.setState(toBeOpened);
|
|
7378
|
+
}, [item, isCollapsed]);
|
|
7378
7379
|
useEffect16(() => {
|
|
7379
7380
|
if (!isCollapsed) return;
|
|
7380
7381
|
setIsOpened.setFalse();
|