fomantic / Fomantic-UI

Fomantic-UI is the official community fork of Semantic-UI
https://fomantic-ui.com
MIT License
3.55k stars 331 forks source link

[Dropdown] Auto select mulitple options from text #3066

Open wdmeest opened 3 months ago

wdmeest commented 3 months ago

Feature Request

Is there a possibility to auto select all existing options from a pasted text, that is separated with a comma. You can do it with the option "allowAdditions" set on "true" but that adds non-existing dropdown options.

Example

Dropdown with following options:

Text to paste into the dropdown "One, other, some"

Should result in automatically selection of "One", "Some" and "Other"

lubber-de commented 3 months ago

This already works out of the box. See https://jsfiddle.net/lubber/hqoL3xtn/5/

paste

wdmeest commented 3 months ago

That works perfectly indeed if the given pasted text contains the values of the options but not when it contains the labels (sorry my fault I didn't mentioned this in the above issue).

Example: https://jsfiddle.net/uogx5L7r/