Select2 4.0.3 migrating from 3.4.0, templateResult query and escapeMarkup params ?

43 views
Skip to first unread message

onox...@gmail.com

unread,
Mar 31, 2017, 3:22:22 AM3/31/17
to select2
Hello, I have to migrate some code (not written by me) from Select2 3.4.0 to 4.0.3. The function for the formatResult option in the old code uses all of the four parameters (result, container, query, escapeMarkup) that are accepted by the default formatResult in 3.4.0, but now in 4.0.3, the new function, templateResult, only gets the first two named parameters, result and container. I couldn't find in the documentation or elsewhere how one should change the code to deal with the loss of query and escapeMarkup. What should I do ? Thanks

onox...@gmail.com

unread,
Mar 31, 2017, 3:58:55 AM3/31/17
to select2, onox...@gmail.com
From what I am seeing in the code of Select2, I guess that for query, we may have to make an adapter. They are referred to in the documentation, but the section about adapters in the doc doesn't exist yet :( Same for the documentation about templates
Reply all
Reply to author
Forward
0 new messages