cancel
Showing results for 
Search instead for 
Did you mean: 

How to add createSearchChoice to select2 widget

adam_bo_
Star Contributor
Star Contributor

Hello,

How to inline createSearchChoice function to select2 widget, for instance this one:

createSearchChoice:function(term, data) { if ($(data).filter(function() { return this.text.localeCompare(term)===0; }).length===0) {return {id:term, text:term};} },

Best regards

0 REPLIES 0