JedWatson / JedWatson/react-select
<title>
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi Guys
The button x to clean any selected iten is not working as expected. Just work when using combining with ismulti=true, but in my case I don't need to use multi.
When I click in the button x to clean, it just do the same just like was arrow down.
Any ideia if is it a bug or something I am doing wrong ?
Thanks in advance.
using react "react": "^18.2.0", and "react-select": "^5.7.2",
<div className="form-group">
<label>Empresas</label>
<Select
isMulti={false}
isSearchable={true}
isClearable={true}
placeholder="Selecionar"
options={empreasasListaState}
onChange={(itemSelecionado)=> {
setFiltro({...filtroState, IdEmpresa : itemSelecionado.value});
setControleTela({...filtroState,Empresa : itemSelecionado});
}}
value={controleTelaState.Empresa} />
</div>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the provided React Select snippet with isMulti={false}, isClearable={true}, and the shown onChange handler. Check the clear-button behavior and the selected-value state, then compare it with the component's existing clearable-select tests or examples. Done means clicking x clears the single selected option without triggering the reported arrow-down behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100