fateh999 / react-native-paper-form-builder

React Native Paper Form Builder with inbuilt Validation, dropdown, autocomplete, checkbox, switch and radio inputs.
MIT License
116 stars 25 forks source link

Side by side fields and custom JSX validation #40

Closed harshit9715 closed 3 years ago

harshit9715 commented 3 years ago

Is there a way I can achieve flex-direction 'row' for form inputs? (trying to place components side by side)

I was able to achieve the UI functionality by returning custom JSX for 1 field but I don't understand how to add validation to type: 'custom',. Can you please add validation in your "Remember me" button example or a different example for custom component validation?

fateh999 commented 3 years ago

To get multi column inputs in a row, you don't need to use custom jsx, just pass an array instead of a config object, in case you want custom input just use custom jsx in the config object.

Check this example