-
Notifications
You must be signed in to change notification settings - Fork 7
<SelectField>: defaultValue does not work as expected #474
Open
Description
Hi,
Let me simplify my problem.
I have this schema.
export class Category { name = def.stringColumn().notNull() articles = def.oneHasMany(Article, 'articles') } export class Article { name = def.stringColumn().notNull() category = def.manyHasOne(Category, 'articles') }
Then I have this simple form
const ArticleForm = Component( () => ( <> <TextField field="name" label="Name" /> <SelectField field="category" label="Category" options="Category.name" defaultValue="62522664-1681-49a8-85c9-21998ef4158c" /> </> ), )
export default () => ( <CreatePage entity="Article" > <ArticleForm /> </CreatePage> )
This will not throw any error and also not "preselect" Category with id 62522664-1681-49a8-85c9-21998ef4158c.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.