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

Please add setting for only show dropdown when editing tag #1312

Closed billy0222 closed 4 months ago

billy0222 commented 5 months ago

Prerequisites

Demo Page

https://codepen.io/vsync/pen/wvGaKxd

Issue

When dropdown.enabled set to 0, click on \<tags> scope will show the dropdown. Is there any way that only allow add tag / show dropdown by click add button?

Issue 2

Added new tag and click on its border triggered blur, but the event target is itself which make it doesn't destroy that invalid tag.

yairEO commented 5 months ago

Hi,

As of v4.23 you can change the tagify.userInput property to allow/disallow manual typing/pasting and this will not affect how the dropdown works when clicking the component.

I hope this helps in any way.

Regarding issue 2, I don't quite understand, maybe you can record a video/gif showcasing the problem and put it here

billy0222 commented 5 months ago

https://github.com/yairEO/tagify/assets/22493672/11927330-3a73-4920-8ad4-18f997d4215d

billy0222 commented 5 months ago

https://github.com/yairEO/tagify/assets/22493672/499da4c5-00e9-45aa-b1d4-c47ed3b241db

https://github.com/yairEO/tagify/assets/22493672/0e5ad995-a889-4e10-a903-f7edcb71801b

I have set the tagify.userInput to false, but the dropdown still pop up when I click on the DOM.scope (triggering focusin). Also, that focusin event trigger when chrome focus again (changign window).

yairEO commented 4 months ago

I see. Investigating, thanks for the videos!

yairEO commented 4 months ago

This is the setup I test react version of Tagify on:

https://replit.com/@yairEO/tagify-react-demo

I prefer pnpm over npm. To run the project run pnpm dev

yairEO commented 4 months ago

added a new setting called focusable which should be set to false at situations such as shown in above videos