Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

Dropdown: When changing the options in a multiple selection dropdown, the currently selected value may not be shown

Open ryanewtaylor opened this issue 8 years ago • 3 comments

Bug Report

Steps

In the provided example...

  1. From the list select 'Angular'
  2. Search for 'gr'

The search here is overridden to search through the local options. In a production scenario the search would be pulling results from a remove source. However, the behavior of the Dropdown is the same.

Expected Result

"Angular" should remain displayed as a selected option.

Actual Result

"Angular" is removed from the display, yet remains "selected" in "values"

Version

Seen in 0.81.3 & 0.82.5

Testcase

https://codesandbox.io/s/579xxlzxn

ryanewtaylor avatar Nov 15 '18 18:11 ryanewtaylor

It's invalid usage of Dropdown.

You're filtering options in the handleSearchChange() and it contains only matching options. But Dropdown shows only values that are present in options.

layershifter avatar Dec 10 '18 08:12 layershifter

So it won't work when the options values should be dynamic, like when you search from large database tables with auto completion..?

tresdev avatar Jul 15 '19 14:07 tresdev

We are currently trying to create a DropDown ellement with the fetch search and we always have the same problem as described above by @ryanewtaylor, is there a solution for this or can the DropDown not work with remote data?

abdoulub avatar Sep 30 '21 12:09 abdoulub