-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown event.target.value is undefined #2249
Comments
I've find out there solution (you should add it to docs, because it's not standard behaviour):
|
Hello @taime, If you take a look at the docs for all SUIR components, all component prop events are layered on top of the regular React SyntheticEvents. If you look at https://react.semantic-ui.com/modules/dropdown for the
There are also a LOT of working examples down the pages of the docs with examples of how this onChange function works with (event, data): https://react.semantic-ui.com/modules/dropdown#dropdown-example-remote |
Duplicate #638. Note that it is impossible to get the a value from the event object, see #638 (comment). |
can you at least evt.target.id? It doesn't return any value |
I'm trying to do controlled component as it shown in official Rect documentation (https://reactjs.org/docs/forms.html):
<Dropdown value={this.state.value} onChange={this.handleChange} />
But **event.target.value is undefined ** so it's impossible to do controlled component as usual.
May be you've made your own way to do this. But then where is documentation for this? I've search a lot... Couldn't find how to do controlled component with Semantic UI Dropdown.
The text was updated successfully, but these errors were encountered: