-
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 options update triggered by onSearchChange #1242
Comments
This is a use case for the Please provide a codepen repro and we'll look into it. |
I cobbled together a codepen here And the |
Okay I got it working, I close the issue |
@jhartma Would it be possible to explain how you fixed your solution? I am experiencing the same problem, the options will only update after a fetch once the I have clicked off screen...?
|
Yep, this works for some reason: <Form.Field
allowAdditions
control={Dropdown}
disabled={disabled}
fluid
id="input-invite-user"
loading={this.props.loading}
onAddItem={this.handleAddition}
onChange={this.handleChange.bind(this)}
onSearchChange={this.onSearchChange.bind(this)}
options={users}
placeholder="Select user"
search
selection
value={value}
width="7"
/> |
In my dropdown module, the options consist of a list of users which are fetched remotely and based on the search value of the dropdown.
When some characters are rendered in the seach field, the dropdown options should display the fetched results.
Strangely, this works when there is only one result. When there are more, no results are shown. I do see the options correctly shown in as
<options>
in the<select>
node, but the corresponding<DropdownItem>
are not rendered. Logging the results in the console also shows them. When I blur the search box and focus it again, the results are all there. So it seems like the dropdown options don't update when there is more than 1 result.The text was updated successfully, but these errors were encountered: