yairEO / tagify

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

Tagify selct mode incorrect behavior #1346

Open russssl opened 3 months ago

russssl commented 3 months ago

Hi. Thank You for the amazing job. I have found some bugs with the select mode.

  1. So pre 4.19 everything was alright. However, in 4.19 you changed the behavior of the select mode so that the tag could be removed letter by letter. This leads to unexpected behavior like removing the whole words not enabling the change event till I click out of input and the blur event fires (and consequently change does).
  2. After 4.20 new bug appeared, so clicking into a tag with tagify--select class does not focus on input. Only clicking into tagify__input (wich is significantly smaller) results in focusing the input. I had to manually track clicks on tagify--select and making it work by tagify__input.focus()
  3. Version 4.22 has one more very significant error. So after selecting a tag and removing it something crashes probably, changes are not being made, and dropdown stops showing

    Bugs 2-3 I was not able to reproduce them, so probably they appear because I use Vue so it might be the case. But still letting you know. Bug 1 was easy to reproduce just by creating a basic select tagify. Versions 22+ have the same issues mentioned earlier

yairEO commented 3 months ago

Thanks!

But what about the current 4.26.5 version? bugs in older versions are irrelevant because nobody should use nothing except the newest as I constantly find & fix bugs.

Regarding your first point, I don't see any issue with it, as it is expected to fire a change event only on blur

russssl commented 3 months ago

Thanks!

But what about the current 4.26.5 version? bugs in older versions are irrelevant because nobody should use nothing except the newest as I constantly find & fix bugs.

Regarding your first point, I don't see any issue with it, as it is expected to fire a change event only on blur

but is there an option to fire it in change for example? because when whole word was deleted it was more convenient

yairEO commented 3 months ago

Why is it "more convenient"? please give me an example scenario

russssl commented 3 months ago

Why is it "more convenient"? please give me an example scenario

For example, I use tagify for the users' list and show user names as tags. I do not need to see John d flag because he is always john doe. This results in an update event firing only on blur which is unusable for me. When the whole tag was solid, I could delete the user from the select immediately without clicking anything additional, and event fired immediately as well as I described earlier

yairEO commented 3 months ago

I'm confused how do you "use tagify for the users' list and show user names as tags" if the title of this issue is about "select mode", which mean only a single option may be selected (there are no tags in this mode)

russssl commented 3 months ago

I'm confused how do you "use tagify for the users' list and show user names as tags" if the title of this issue is about "select mode", which mean only a single option may be selected (there are no tags in this mode)

Yes, you are right. However, it is still pretty inconvenient to have a divided tag. As I see it it does not serve any real purpose.

yairEO commented 2 months ago

what do you mean a divided tag?

can you please re-explain to me what is the issue (with the latest Tagify version)? I cannot understand. please explain it step-by-step what are you doing and what you expect to happen and what happens instead