My goal is to have one of the options pre-selected when the user starts filling out the form. How can I achieve that?
How to set an initial value for SegmentedButtons on react-native-paper?
70 views Asked by Mariana Reis Silveira At
1
My goal is to have one of the options pre-selected when the user starts filling out the form. How can I achieve that?
Even though I had set the prop value on the component, it was not activating the corresponding button.
It took me a minute to realize that the value I had initially set was a number, but the value I passed on the buttons array was a string.
It's a silly mistake but it can happen...