@pablozaiden/webapp 0.3.8 → 0.3.9
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/package.json +1 -1
- package/src/web/WebAppRoot.tsx +2 -1
package/package.json
CHANGED
package/src/web/WebAppRoot.tsx
CHANGED
|
@@ -1112,6 +1112,7 @@ export function WebAppRoot({ appName, homeRoute, sidebar, routes, header, onRout
|
|
|
1112
1112
|
...augmented,
|
|
1113
1113
|
];
|
|
1114
1114
|
}, [augmentPinningActions, baseNodes, currentPins, filteredNodes, pinningEnabled, sidebar.pinning, sidebarSearchActive]);
|
|
1115
|
+
const activeActionNodes = useMemo(() => augmentPinningActions(baseNodes), [augmentPinningActions, baseNodes]);
|
|
1115
1116
|
|
|
1116
1117
|
useEffect(() => {
|
|
1117
1118
|
if (!config?.currentUser) return;
|
|
@@ -1176,7 +1177,7 @@ export function WebAppRoot({ appName, homeRoute, sidebar, routes, header, onRout
|
|
|
1176
1177
|
const topActions = sidebar.topActions?.slice(0, 2) ?? [];
|
|
1177
1178
|
const defaultTitle = route.view === "settings" ? "Settings" : route.view === homeRoute.view ? appName : route.view.replace(/-/g, " ");
|
|
1178
1179
|
const headerContext = { route, defaultTitle };
|
|
1179
|
-
const activeSidebarNode = flattenSidebarItems(
|
|
1180
|
+
const activeSidebarNode = flattenSidebarItems(activeActionNodes).find((node) => routeMatches(node.route, route));
|
|
1180
1181
|
const activeSidebarActions = activeSidebarNode?.actions ?? [];
|
|
1181
1182
|
const headerActions = [
|
|
1182
1183
|
...(header?.getActions?.(headerContext) ?? []),
|