Просмотр исходного кода

fix(dashboard): Fix for custom nav section placement (#3995)

Martin Lundberg 1 месяц назад
Родитель
Сommit
372fbf3ea7

+ 1 - 1
packages/dashboard/src/lib/framework/extension-api/logic/navigation.ts

@@ -10,7 +10,7 @@ export function registerNavigationExtensions(
         for (const section of navSections) {
             addNavMenuSection({
                 ...section,
-                placement: 'top',
+                placement: section.placement ?? 'top',
                 order: section.order ?? 999,
                 items: [],
             });

+ 5 - 0
packages/dashboard/src/lib/framework/extension-api/types/navigation.ts

@@ -97,4 +97,9 @@ export interface DashboardNavSectionDefinition {
      * Optional order number to control the position of this section in the sidebar.
      */
     order?: number;
+    /**
+     * @description
+     * Optional placement to control the position of this section in the sidebar.
+     */
+    placement?: 'top' | 'bottom';
 }