Semantic-ui-react: Dropdown (multiple, remote search): selected options with inconsistent render

Created on 28 Jun 2018  路  3Comments  路  Source: Semantic-Org/Semantic-UI-React

Bug Report

Selected options occasionally don't render when options changes by a remote search.
I think that the displayed options (selected options) are based on the same options fetched remotely.
So when a selected option is not among the remotely searched options it is not displayed.

Steps

  1. search for ala
  2. select Alabama and Alaska
  3. search for cali
  4. select California

Expected Result

All three options selected (Alabama, Alaska, and California) are expected to be displayed.

Actual Result

Only the California option is displayed.

Version

0.81.3

Testcase

https://codepen.io/rayronvictor/pen/MXzzQv?editors=0011

invalid

Most helpful comment

Sorry to comment on an already-closed issue, but we have over 1000 items for the user to select from. I've set lazyLoad=true and minCharacters=2 but the UI is significantly slower than making multiple (debounced) API calls to our backend to provide filtered results. I could augment the options returned from our API call with the user's selected values, but that would defeat the purpose of this component doing much of the work for me.

All 3 comments

It's an expected behavior, all values should be defined in options.

Sorry to comment on an already-closed issue, but we have over 1000 items for the user to select from. I've set lazyLoad=true and minCharacters=2 but the UI is significantly slower than making multiple (debounced) API calls to our backend to provide filtered results. I could augment the options returned from our API call with the user's selected values, but that would defeat the purpose of this component doing much of the work for me.

This looks like a valid bug, and is a pretty typical use case. If you have a multi-select dropdown with a remote API that does the search and returns the filtered results, then there is no way to retain the already selected items.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dilizarov picture dilizarov  路  3Comments

nix1 picture nix1  路  3Comments

ryanpcmcquen picture ryanpcmcquen  路  3Comments

keeslinp picture keeslinp  路  3Comments

saikrishnadeep picture saikrishnadeep  路  3Comments