Skip to content

Commit cd4d037

Browse files
committed
feat(navigation): allow ObjectNavItemSchema to have optional child navigation items
1 parent 8ccfdfb commit cd4d037

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/spec/src/ui/app.zod.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ export const GroupNavItemSchema = BaseNavItemSchema.extend({
9191
*/
9292
export const NavigationItemSchema: z.ZodType<any> = z.lazy(() =>
9393
z.union([
94-
ObjectNavItemSchema,
94+
// Object Item can now have children (Airtable style: Object -> Views)
95+
ObjectNavItemSchema.extend({
96+
children: z.array(NavigationItemSchema).optional().describe('Child navigation items (e.g. specific views)'),
97+
}),
9598
DashboardNavItemSchema,
9699
PageNavItemSchema,
97100
UrlNavItemSchema,

0 commit comments

Comments
 (0)