contributte / datagrid

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc

Home Page:https://contributte.org/packages/contributte/datagrid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FilterDateRange and change in items per page

Michal-Szekeres opened this issue · comments

Hello,
If you try to filter items in grid with FilterDateRange, it works well, but then if you change items per page, for example from 20 to 50, you can see, that the item count at the bottom is not the same anymore and if you try to reload the page, the value in FilterDateRange input is no longer there. The problem seems to be in function "createComponentFilter" in setting up the validationScope on "perPage_submit", so I made a workaround, simply overload "createComponentFilter" function and set validation scope to NULL, until there is a proper solution:

	public function createComponentFilter(): Form
	{
		$form = parent::createComponentFilter();
		$form['perPage_submit']->setValidationScope(NULL);
		return $form;
	}

Hi. I think it's related to some Nette Forms changes & Datagrid latest reactions to this. Try the git version (which has the #997 fix) and additional fix #1001.

Solved via #1001 and #997.