AutoForm select field types is missing options
lwolle opened this issue · 4 comments
lwolle commented
Description
When I use a form field of type select in the AutoForm
component, I expect it to be able to provide options
, but TypeScript errors with the error message below
TS2353: Object literal may only specify known properties, and options does not exist in type SchemaField
and I expect the provided defaultValue
to be taken into account in the form result.
Link to Reproduction
https://codesandbox.io/p/sandbox/still-rain-cxc6w2
Steps to reproduce
Part 1
- Open the repro
- Inspect the code
- the form schema is typed as
ObjectSchema
Part 2
- Hit submit
- Inspect the result and expect the object to resemble
{
toxic: "no",
}
the actual result is
{
toxic: undefined,
}
Saas UI Version
2.5.5
Chakra UI Version
2.8.2
Browser
Brave 1.61.104
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
Pagebakers commented
Thanks for the elaborate explanation! The code sandbox doesn't exist it says, maybe it's private?
lwolle commented
codesandbox.io/p/sandbox/still-rain-cxc6w2
Sorry about that. I made it public now.
Pagebakers commented
Found the issue, looking for a fix now.