@orderly.network/ui-scaffold 2.8.9 → 2.8.10-alpha.0
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5271,10 +5271,14 @@ var NavItem2 = (props) => {
|
|
|
5271
5271
|
}
|
|
5272
5272
|
};
|
|
5273
5273
|
}, [showButtonTooltip]);
|
|
5274
|
-
const isActive = React6.useMemo(
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5274
|
+
const isActive = React6.useMemo(() => {
|
|
5275
|
+
const current = currentPath?.[0];
|
|
5276
|
+
if (!current)
|
|
5277
|
+
return false;
|
|
5278
|
+
if (current === item.href)
|
|
5279
|
+
return true;
|
|
5280
|
+
return Array.isArray(item.activeHrefs) && item.activeHrefs.includes(current);
|
|
5281
|
+
}, [currentPath, item.href, item.activeHrefs]);
|
|
5278
5282
|
const hasSubMenu = Array.isArray(item.children) || typeof item.customSubMenuRender === "function";
|
|
5279
5283
|
const hasCustomSubMenuRender = typeof item.customSubMenuRender === "function";
|
|
5280
5284
|
const onClickHandler = React6.useCallback(() => {
|