Link command menu items to specific page layout (#19706)
- Add a `pageLayoutId` foreign key to `CommandMenuItem`, allowing command menu items to be scoped to a specific page layout instead of being globally available - Filter command menu items by the current page layout on the frontend. Items with a `pageLayoutId` only appear when viewing that layout, while items without one remain globally visible - Create an effect to track the current page layout ID - Include a seed example: a "Show Notification" command pinned to the Star history standalone page layout --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -95,7 +95,9 @@ export const useSetIsPageLayoutInEditMode = (pageLayoutIdFromProps: string) => {
|
||||
|
||||
store.set(contextStoreIsFullTabWidgetInEditModeState, value);
|
||||
|
||||
store.set(currentPageLayoutIdState.atom, value ? pageLayoutId : null);
|
||||
if (value) {
|
||||
store.set(currentPageLayoutIdState.atom, pageLayoutId);
|
||||
}
|
||||
},
|
||||
[
|
||||
isDashboardInEditModeState,
|
||||
|
||||
Reference in New Issue
Block a user