Unform: RadioButton funcionality

Created on 20 Feb 2020  路  5Comments  路  Source: unform/unform

How would RadioButton and OptionButton look?
Is it possible to implement this feature?

feature request

Most helpful comment

Hi @filipecoelho, i did an example implementation of Radio Buttons with Unform.

https://codesandbox.io/s/heuristic-haslett-58hhy?fontsize=14&hidenavigation=1&theme=dark

Let me know if it helped you.

All 5 comments

Hi @filipecoelho, i did an example implementation of Radio Buttons with Unform.

https://codesandbox.io/s/heuristic-haslett-58hhy?fontsize=14&hidenavigation=1&theme=dark

Let me know if it helped you.

Hi @diego3g ,

I used this sample code and it was perfect, but I had some doubts ...

As it would be to set a default value at startup and also when something is returned from the API, I tried using the setData and it didn't work.

Thankful.

Hello, @rafaelqw!

I updated the example with support for defaultValue and manual setData, can you take a look and share your thoughts?

https://codesandbox.io/s/heuristic-haslett-58hhy?expanddevtools=1&fontsize=14&hidenavigation=1&theme=dark

Wonderful, it worked! Thank you!

Hi @filipecoelho, i did an example implementation of Radio Buttons with Unform.

https://codesandbox.io/s/heuristic-haslett-58hhy?fontsize=14&hidenavigation=1&theme=dark

Let me know if it helped you.

Works perfectly
nice job and thanks :D

Was this page helpful?
0 / 5 - 0 ratings