Closed VincentKneip closed 2 months ago
The implementation of this issue might be too complicated and not really necessary.
We suggest to just clear all selected terms on property changes.
Added the functionality in this commit. When feat/plainJS-sb-integration
is merged, this issue can be closed.
Currently, the
selectedOptions
array within AutocompleteWidget does not get changed when widget properties likeapi
orhasShortSelectedLabel
are adjusted. This leads to the following inconveniences:allowCustomTerms
fromtrue
tofalse
does not remove already selected custom termshasShortSelectedLabel
does not alter the label length of already selected termssingleSelection
fromfalse
totrue
writes the selected terms into one single term labelparameter
orapi
string does not apply changes to the already selected termsIf changing the widget properties dynamically is an intended feature, the inconveniences should be removed by re-querying and storing more information about the selected terms (e.g. whether they are custom terms, and their long and short label form). Is changing the widget properties dynamically intended, or just a feature in the Storybook, which won't appear in real applications?