ts4nfdi / terminology-service-suite

The SemLookP Widgets project is a collection of interactive widgets designed to ease the integration of terminology service functions into third-party applications.
https://ts4nfdi.github.io/terminology-service-suite/comp/latest/
MIT License
12 stars 2 forks source link

AutocompleteWidget: SelectedOptions are not mutated on property changes #66

Closed VincentKneip closed 2 months ago

VincentKneip commented 3 months ago

Currently, the selectedOptions array within AutocompleteWidget does not get changed when widget properties like api or hasShortSelectedLabel are adjusted. This leads to the following inconveniences:

If 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?

VincentKneip commented 3 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.

VincentKneip commented 2 months ago

Added the functionality in this commit. When feat/plainJS-sb-integration is merged, this issue can be closed.