mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 23:48:16 +08:00
Fixes #7450: Don't add empty parameters to URL when filtering a grid
This commit is contained in:

committed by
Alexander Makarov

parent
78299a3f01
commit
aba7710699
@ -101,7 +101,9 @@
|
||||
$grid.find('form.gridview-filter-form').remove();
|
||||
var $form = $('<form action="' + url + '" method="get" class="gridview-filter-form" style="display:none" data-pjax></form>').appendTo($grid);
|
||||
$.each(data, function (name, value) {
|
||||
$form.append($('<input type="hidden" name="t" value="" />').attr('name', name).val(value));
|
||||
if (value !== '') {
|
||||
$form.append($('<input type="hidden" name="t" value="" />').attr('name', name).val(value));
|
||||
}
|
||||
});
|
||||
|
||||
event = $.Event(gridEvents.beforeFilter);
|
||||
|
Reference in New Issue
Block a user