yairEO / tagify

🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue
https://yaireo.github.io/tagify/
Other
3.5k stars 430 forks source link

In Select Mode, only change input once when changing values #1116

Open CarlosFdez opened 2 years ago

CarlosFdez commented 2 years ago

First of all, big thanks for working on this. This library so far has been very helpful for the Pathfinder 2e system for Foundry, and for lists of validated traits it has been much better than the way we've been doing it before.

So currently, for tagify controls in select mode, it seems that whenever you change the selected value when a value has already been selected, it changes the associated input twice, once to clear the data, and again to set the new data. It would be really nice if the input was changed only once to the final result, that way the input change event fires once for the new result. Right now a DB update and re-render is tied to that on change event in what I'm working on, swallowing the second update whole.

yairEO commented 2 years ago

Thanks Carlos! I will look into it

stwlam commented 1 year ago

Is this really an "enhancement" request rather than a bug report? Making a selection once causes two change events to fire.