Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
I have to render a conditional field based on value of other field. right now with auto form it seems to be not supported.
I am using fieldOptions > renderer property to customize both the fields but the dependent field cannot get the value of other field.
Allow for a propety to share state of whole form from the caller component and update that state when the form values changes. AutoForm has this item propery, if we accept the setter for that then updating the same state can help handle fieldOptions rendering.
I tried using useForm hook with AutoForm but it seems not to update the value.
Happy to understand if there are any other ways possible and available currently.
Describe your motivation
I have to render a conditional field based on value of other field. right now with auto form it seems to be not supported. I am using fieldOptions > renderer property to customize both the fields but the dependent field cannot get the value of other field.
I want to perform something similar to what mentioned over here but with AutoForm: https://vaadin.com/docs/latest/hilla/guides/forms/form-status-tracking#example-populate-a-field-based-on-another
Describe the solution you'd like
Allow for a propety to share state of whole form from the caller component and update that state when the form values changes. AutoForm has this item propery, if we accept the setter for that then updating the same state can help handle fieldOptions rendering.
observe the onChange method.
Describe alternatives you've considered
I tried using useForm hook with AutoForm but it seems not to update the value. Happy to understand if there are any other ways possible and available currently.