Repository navigation
Visibility logic #1270
|
I think it would be appropriate to add Visibility logic to fields <form.Field
conditional={[(form: FormApi): boolean => {
return true;
}, ['fieldname', 'fieldname2']]}
/>This feature should affect both rendering and validation. |
Answered by
juanvilladev
Mar 13, 2025
Replies: 1 comment 1 reply
|
You could build this into your subfields when building your composable fields. You could add an extra prop for is visible then within the subcomponent render null when not visible. Take a look at my Full Name field definition in this example: |
1 reply
Answer selected by
crutchcorn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could build this into your subfields when building your composable fields. You could add an extra prop for is visible then within the subcomponent render null when not visible.
Take a look at my Full Name field definition in this example:
https://stackblitz.com/edit/tanstack-form-dowbrasw?file=src%2Ffeatures%2Fpeople%2Fpage.tsx