You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why are you calling loadOriginalValues?
I don't see why would you ever do something like this as it resets your tagify field when a tag is selected, and regardless, why would you want to reset it?
Because the string can be in an unmapped format that tagify won't recognize. Some user likely typing ${PLACEHOLDER} instead of using the autocompletion (Because it was the way before we implemented your lib). If thats the case i need to change the string so it contains the tag the way tagify needs it. Also the Hovertext (It shows what the placeholder will be replaced with) can change. So i update the String that the hover text change accordingly. Then after mapping i need to use that method that the input shows the tags correctly. I can send a gif how the input would react without it if needed on monday.
What the workflow looks like
onChange calls a method that uses the value (event.detail.value)
That Method checks if the value contains an Placeholder that our backend can understand ${Placeholder}
It looks up if we have a Placeholder with that name and replace it with "[["value":"PlaceholderName","title":"Hovertext"]] (Or the other way arround i am not sure)
Then i passed this mapped string into loadOriginalValues
So i just get what the user typed in -> do stuff with it -> return it to tagify
Prerequisites
💥 Demo Page
https://jsbin.com/vogabovodo/1/edit?js,console,output
Explanation
What is the expected behavior?
When I select a tag from the dropdown with a mouse click, it should be present in the value of the change event.
What is happening instead?
The tag is only present in the change event after the second attempt to add the tag by clicking in the dropdown.
Steps to reproduce with the demo
$b
into the input.banana
from the dropdown with a mouse click.b
and write it again to open the dropdown again.banana
again."$b"
"[[{\"value\":\"banana\",\"prefix\":\"$\"}]]"
The text was updated successfully, but these errors were encountered: