How to set an initial value for SegmentedButtons on react-native-paper?

70 views Asked by At

My goal is to have one of the options pre-selected when the user starts filling out the form. How can I achieve that?

enter image description here

1

There are 1 answers

0
Mariana Reis Silveira On

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...