|
|
@@ -280,6 +280,7 @@
|
|
|
paginationPreText: '‹',
|
|
|
paginationNextText: '›',
|
|
|
search: false,
|
|
|
+ searchOnEnterKey: false,
|
|
|
strictSearch: false,
|
|
|
searchAlign: 'right',
|
|
|
selectItemName: 'btSelectItem',
|
|
|
@@ -1066,6 +1067,12 @@
|
|
|
this.$toolbar.append(html.join(''));
|
|
|
$search = this.$toolbar.find('.search input');
|
|
|
$search.off('keyup drop').on('keyup drop', function (event) {
|
|
|
+ if (that.options.searchOnEnterKey) {
|
|
|
+ if (event.keyCode !== 13) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
clearTimeout(timeoutId); // doesn't matter if it's 0
|
|
|
timeoutId = setTimeout(function () {
|
|
|
that.onSearch(event);
|