Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Unform React Select Example Doc #426

Open
luizwhite opened this issue Sep 14, 2021 · 1 comment
Open

Unform React Select Example Doc #426

luizwhite opened this issue Sep 14, 2021 · 1 comment

Comments

@luizwhite
Copy link

Description of issue

React Select example on Unform Docs don't have the setValue or clearValue methods
Please, include the code since it is common to set or clear select inputs values through unform

Usage example

React Select Example

setValue example

image

Don't know if there is a better implementation but it is working
In this case labels are equal to values, but it could be a different approach.

@diego3g
Copy link
Contributor

diego3g commented Apr 7, 2022

The doc example also includes a condition to check if it is a multiple select:

if (rest.isMulti) {

So I think we need a setValue and clearValue that also covers that.

Can you send a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants