Answer the question
In order to leave comments, you need to log in
How to know the state of a Select dropdown list?
Is it possible to know the state of the list - collapsed or opened in the following situation:
<Select
value={this.state.value}
onChange={this.handleChange}
>
<MenuItem value="">
// тут как-то надо проверить состояние списка
</MenuItem>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
</Select>
Answer the question
In order to leave comments, you need to log in
I see two options:
1) control the open prop
2) throw onOpen / onClose and rely on this state in the local useState
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question