Allow createTag only if no results are found

28 views
Skip to first unread message

inte...@gmail.com

unread,
Jul 31, 2016, 3:15:44 PM7/31/16
to select2
Hello,

I have a select2 list with the following options :

tags: true,
minimumResultsForSearch : 6

This list also uses ajax to load data.

If no results are available from the ajax lookup, the search field is not displayed because of the "minimumResultsForSearch:6" option. This makes it impossible to create a user defined value.

If I set the "minimumResultsForSearch" to 0, then the search field is always available making the createTag functionnal.

Is there a way to keep minimumResultsForSearch above 0 and display the search field if the number of results is 0 or above the minimumResultsForSearch value?

Thank you

Reply all
Reply to author
Forward
0 new messages