adityacodepublic
adityacodepublic
``` tsx onSubmit(d} defaultValues={{ name: "John Doe", age: 25, email: "[email protected]", website: "https://example.com", color: "green", birthdate: "1990-01-01" as unknown as Date, isStudent: true, }} withSubmit /> ``` try this
**Note:** Rendering objects on click would also mean that users must open a **Required(Optional inner fields)** object even if they don't want to fill it, to submit the form. In...
@vantezzen Have you thought of any suitable UI patterns for optional sub-objects ? like card, accordion, or flat (current) Or supporting all three via props ?
try using this select component ``` tsx import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { AutoFormFieldProps } from "@autoform/react"; import React from "react"; import { useController...
Place the buttons inside the AutoForm as children with correct type like submit https://codesandbox.io/p/github/adityacodepublic/project2/main?import=true
``` js const hi = { "label 1": "value1", "label 2": "value2", "label 3": "value3", } as const; ``` ``` tsx {(field.options || []).map(([key, label]) => ( {key} ))} ```...
The issue is caused by the FieldWrapper showing errors for array and object fields, which isn’t necessary. Please update your FieldWrapper component to the following: ``` tsx import React from...
So should I update Ant and MUI to use `key` ?
But for ``` ts enum Sports { Football = "Football/Soccer", Basketball = "Basketball", Baseball = "Baseball", Hockey = "Hockey (Ice)", None = "I don't like sports", } ``` key will...
Depending on the use case, the user may require either the `label` or the `id` (key) as the selected value from the form there should be a way to provide...