2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-26 06:46:32 +00:00

[FEATURE] Allow to override formatGroup callback via options

This commit is contained in:
Benjamin Mack 2015-07-18 16:13:21 +02:00
parent 2b7e259b74
commit 4d736f3cf4

View File

@ -645,7 +645,7 @@
beforeRender = options.beforeRender,
html = '',
category,
formatGroup = function (suggestion, index) {
formatGroup = typeof options.formatGroup == 'function' ? options.formatGroup : function (suggestion, index) {
var currentCategory = suggestion.data[groupBy];
if (category === currentCategory){