Select2 Event for creating a new tag

I’m using the jQuery Select2 (v4) plugin for a tag selector.

I want to listen for when a new tag is created in the select element and fire an ajax request to store the new tag. I discovered there is the createTag event but this seems to fire every time a letter is entered into the select2 element. As shown in my fiddle:

Is there a similar event that only fires when the new tag has finished being entered? I.e. it’s enclosed by a grey box enclosing it.

4 thoughts on “Select2 Event for creating a new tag”

  1. 555544 520350Superb post. I was checking constantly this blog and Im impressed! Extremely helpful details specially the last part I care for such data a lot. I was seeking this specific details for a long time. Thank you and finest of luck. 419456


Leave a Comment