Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The reset column filter functionality is broken when the datagrid is nested inside another component #855

Open
wants to merge 1 commit into
base: v5.x
Choose a base branch
from

Conversation

Jakub-Fajkus
Copy link
Contributor

@Jakub-Fajkus Jakub-Fajkus commented Nov 28, 2019

The reset column filter functionality is broken, when the datagrid component is nested inside another component.

Just to be clear, it is the X link in the table heading (screen included)

reset_column

So, the proposed solution is as follows.
I've removed the JS code, that changes the URL of the link to delete the filter on a column. The comment said that the code is there because table header is not refreshed using snippets. So, I've added the snippet to the thead element. Next, the snippet is invalidated in the \Ublaboo\DataGrid\DataGrid::reload() method.

Basically, I wonder why it was originally done that way and not via the snippet invalidation.

I've tested that change for grid, which is directly attached to the presenter as well as grid inside another component and it seems to be working just fine. i don't think this could cause any issue other than slightly bigger network traffic.

@Jakub-Fajkus
Copy link
Contributor Author

@paveljanda @f3l1x What do you think? I would love to see that in the 5.7.* versions since I consider that a bug and because there are still people (inluding me) who cannot yet update to nette 3.0.

@f3l1x
Copy link
Member

f3l1x commented Nov 24, 2021

What do you think @paveljanda?

@paveljanda
Copy link
Member

All this code was added because older (I am not sure whether it still happens in newer versions) nette versions did not behave exactly as intended - speaking about snippets. To merge this PR, it would require a thorough testing across multiple nette versions and all possible scenarious with both this and without this PR. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants