react-better-html 1.1.203 → 1.1.204

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
@@ -9484,7 +9484,7 @@ var MenuItemComponent = (0, import_react30.memo)(function MenuItemComponent2({ i
9484
9484
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
9485
9485
  const onClickElement = (0, import_react30.useCallback)(() => {
9486
9486
  if (item.disabled) return;
9487
- if (!item.children) setActiveItem(void 0);
9487
+ if (!item.children) setActiveItem((oldValue) => oldValue?.href === item.href ? oldValue : void 0);
9488
9488
  if (item.children) {
9489
9489
  setSideMenuIsCollapsed.setFalse();
9490
9490
  if (isCollapsed) setTimeout(setIsOpened.setTrue, 0.1 * 1e3);