mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-31 02:28:35 +08:00
Fixes #16365: Added $filterOnFocusOut option for GridView
This commit is contained in:
committed by
Alexander Makarov
parent
a5c8b215b3
commit
80d0c2b05a
@ -14,7 +14,7 @@
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
return methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist in jQuery.yiiGridView');
|
||||
return false;
|
||||
@ -23,7 +23,8 @@
|
||||
|
||||
var defaults = {
|
||||
filterUrl: undefined,
|
||||
filterSelector: undefined
|
||||
filterSelector: undefined,
|
||||
filterOnFocusOut: true
|
||||
};
|
||||
|
||||
var gridData = {};
|
||||
@ -82,6 +83,9 @@
|
||||
var $e = $(this);
|
||||
var settings = $.extend({}, defaults, options || {});
|
||||
var id = $e.attr('id');
|
||||
if (!settings.filterOnFocusOut) {
|
||||
return false;
|
||||
}
|
||||
if (gridData[id] === undefined) {
|
||||
gridData[id] = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user