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 CHANGED
@@ -3657,6 +3657,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
3657
3657
  const onChangeValue = (0, import_react18.useCallback)(
3658
3658
  (newValue) => {
3659
3659
  setSearchQuery(newValue);
3660
+ setIsOpen.setTrue();
3660
3661
  if (withDebounce) setDebouncedSearchQuery(newValue);
3661
3662
  else onChangeSearch?.(newValue);
3662
3663
  },
@@ -7407,8 +7408,8 @@ var MenuItemComponent = (0, import_react31.memo)(function MenuItemComponent2({ i
7407
7408
  const toBeOpened = item.children.some(
7408
7409
  (child) => child.href ? location.pathname === "/" ? location.pathname === child.href : location.pathname.startsWith(child.href) && child.href !== "/" : false
7409
7410
  );
7410
- setIsOpened.setState(toBeOpened);
7411
- }, [item]);
7411
+ if (!isCollapsed) setIsOpened.setState(toBeOpened);
7412
+ }, [item, isCollapsed]);
7412
7413
  (0, import_react31.useEffect)(() => {
7413
7414
  if (!isCollapsed) return;
7414
7415
  setIsOpened.setFalse();