diff --git a/apps/dev/src/schema/Folder.tsx b/apps/dev/src/schema/Folder.tsx index e992359f..b56aac33 100644 --- a/apps/dev/src/schema/Folder.tsx +++ b/apps/dev/src/schema/Folder.tsx @@ -2,14 +2,12 @@ import {Config, Field} from 'alinea' import {Page} from './Page.js' import {LinkFields} from './example/LinkFields.js' -export const Folder = Config.type('Folder', { +export const Folder = Config.document('Folder', { contains: [Page, LinkFields], fields: { - title: Field.text('Title', { - width: 0.5 - }), - path: Field.path('Path', { - width: 0.5 + childrenLink: Field.entry('Pick children', { + help: `Show only children of the current entry`, + pickChildren: true }) } }) diff --git a/src/picker/entry/EntryPicker.browser.tsx b/src/picker/entry/EntryPicker.browser.tsx index f1ac9f3f..0de9ed12 100644 --- a/src/picker/entry/EntryPicker.browser.tsx +++ b/src/picker/entry/EntryPicker.browser.tsx @@ -147,7 +147,10 @@ export function EntryPickerModal({ { _workspace: destination.workspace, _root: destination.root, - _parentId: withNavigation ? destination.parentId ?? null : undefined, + _parentId: + withNavigation || pickChildren + ? destination.parentId ?? null + : undefined, _locale: destinationLocale } ]