yairEO / tagify

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

Tag element does not exist #1295

Closed russssl closed 9 months ago

russssl commented 9 months ago

Prerequisites

💥 Demo Page

https://codesandbox.io/p/devbox/tagify-bug-7lryqm?file=%2Findex.html%3A35%2C1

Explanation

When enforceWhitelist: true enabled, input is empty and Backspace clicked 'tag element does not exist' appears in the console. It does not affect the input itself just a little annoying seeing spam in the console

yairEO commented 9 months ago

I will fix this in the next release. will wrap all console.warn & console.log with a dedicated wrapper which by default will not log anything unless specifically set Tagify.logger.enabled = true

russssl commented 7 months ago

@yairEO Why did you decide to go with default enabled in v1.23?

yairEO commented 7 months ago

@russssl -because I think it is helpful for developers, and non-developers (users) are not working with their console open anyway so it doesn't matter in that case

russssl commented 7 months ago

@russssl -because I think it is helpful for developers, and non-developers (users) are not working with their console open anyway so it doesn't matter in that case

yes, I understand your logic of course but in my use case, it just seems wrong to have a warning when I did nothing wrong or the code is not wrong just I have no tags inside input. But anyway, I turned it off so it does not bother me anymore :)

yairEO commented 7 months ago

I have now fixed the core of this issue and you will not see this specific error again even if you enable debugging. will push a new version today, soon

russssl commented 7 months ago

I have now fixed the core of this issue and you will not see this specific error again even if you enable debugging. will push a new version today, soon

Awesome

yairEO commented 7 months ago

done https://github.com/yairEO/tagify/releases/tag/v4.25.0

russssl commented 7 months ago

🫡