kendo-react
kendo-react copied to clipboard
Form component improvements
- [x]
FieldArray
component - useful for Grid like components. This allows optimizations like getting new data only when needed. For example if Grid is used, it can get values on first render and refresh it only on hittingAdd New
button. - [x] Form level validation - submit level validation.
- [x] Submitted form state
- [x] Passing additional props to Field validator - demo here
- [ ] Async validations - validation functions to support promises.
- [ ] Submit remote validations - workaround till feature is available: in this demo + validation debounce
- [ ] API additions -
component
property for the Form andrender
property for theField
component. - [ ] Improve hooks support - need to add alternative to
render
prop of the form for that case - [ ] FieldRenderProps - Add field
form
toFieldRenderProps
that will containsetFieldValue
method to allow update dependent fields. - [x] onFormReset in the ref - Provide onFormReset in the component ref so it can be used to reset the form was the submit is complete.
- [ ] Form Item - new component to handle labels binding to editor automatically (taking care of
id
,htmlFor
and editorref
) - [ ] FieldArray example - Add an example for the FieldArray or make the current one located in the validation section more visible. Improve the current example with cell validation. Also make FieldArray and Field pass it's field name to the render props to able to build nested fields easily. For example we can than pass it using context. demo
- [ ] Hooks Form - There is huge search demand for
react hook form
.
FieldArray
and Form
level validation are available in 3.11.0-dev.202002031337
In my opinion, KendoReact's Form component should have a method for changing the error status of a field. This would be very useful in case of ajax validations.
Formik has this signature for the onSubmit() method:
onSubmit(values, {setSubmitting, setFieldError})
setFieldError('node_of_json', 'Error message')
This function applies the error classes and puts the message under the field.
Thanks a lot.
validation on submit requested again in 1519935
server validation requested again in 1522895
What should be done for the server validation? In my eyes only a demo is missing.
For server validations we need to add support for promises. I think the time for this improvement has come.
server validation requested again in 1536675
request for server validation: 1543675
server validation + FormContext requested in 1556209
We would love to see this finished, especially the async/server validations.
Is there a work around for async/server validation ?
Is there any work on an async validator?