-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatically adding tags in mix-mode throws an error #709
Comments
Thank you, I will fix it soon. May I ask why do you wish to add a tag this way and not the "react" why - by updating the |
Updating by value return String empty "" in the onChange, after updating the value |
Still need help? on the React demo page, tagify works good when updating the |
|
So how do you add tags programmatically in mixed mode @yairEO ? Maybe also specify insert position? |
There is a way, now I remember: See my last comment here: |
Thanks that is nice but it is much more logical just to extend the addTags to work with mixed mode. You can then detect if there is a caret position and use it, or insert at the end. Or if another tag is selected add after it or replace. Such functionality should be just in the core so we shouldn't have to program it each time we need a tag inserted. |
what do you mean by "another tag is selected"? in what way can a tag be selected? How important is this to your project? |
Oh sorry i added this programically myself 😀 very useful though when you want to edit a specific tag in external UI - it can have a "selected" state (done with css border for example) and then user can hit some edit button |
I've made the adjustment, per your request, to have Once I deploy the new version, calling If previous selection detected, the tag-to-be-added will be added to that selection (using the selection's |
Prerequisites
got JS error:
When using addTags, like:
TAGIFY.addTags([{id: "query.aa", title: "query.aa", value: "query.aa"}])
The text was updated successfully, but these errors were encountered: