@orderly.network/ui-scaffold 2.8.9 → 2.8.10
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.mjs
CHANGED
|
@@ -5264,10 +5264,14 @@ var NavItem2 = (props) => {
|
|
|
5264
5264
|
}
|
|
5265
5265
|
};
|
|
5266
5266
|
}, [showButtonTooltip]);
|
|
5267
|
-
const isActive = useMemo(
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5267
|
+
const isActive = useMemo(() => {
|
|
5268
|
+
const current = currentPath?.[0];
|
|
5269
|
+
if (!current)
|
|
5270
|
+
return false;
|
|
5271
|
+
if (current === item.href)
|
|
5272
|
+
return true;
|
|
5273
|
+
return Array.isArray(item.activeHrefs) && item.activeHrefs.includes(current);
|
|
5274
|
+
}, [currentPath, item.href, item.activeHrefs]);
|
|
5271
5275
|
const hasSubMenu = Array.isArray(item.children) || typeof item.customSubMenuRender === "function";
|
|
5272
5276
|
const hasCustomSubMenuRender = typeof item.customSubMenuRender === "function";
|
|
5273
5277
|
const onClickHandler = useCallback(() => {
|