contributte / datagrid

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc
https://contributte.org/packages/contributte/datagrid/
MIT License
285 stars 189 forks source link

Modified filters from different page #1074

Open survik1 opened 1 year ago

survik1 commented 1 year ago

Hello, we had table that was rewritten to Datagrid. There is just one function i am not able to implement. We used to sent email which is ~combination of grid filters. I had several ideas on this approach. Any passing of parameter through url + setDefaultFilter/setFilter fails on grid reset. I wanted to modify filter with setRefreshUrl(true) + passing query parameter from component, but any passed value is immediately overriden.

It would seem that only plausible approach is to create dedicated EP that will store required values to session, redirect to component and to delete the value on first setFilter method call. Isnt there a better way to set filter value through link?

survik1 commented 9 months ago

Alright, so i read the full discussion about this library and I have found that, since v 4.3, all you have to do is to set $grid::$formMethod = 'GET';

As there have been more questions about this functionality, I believe it would be useful to add it to doc.