Attempt to fix the grid filter #1678
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is a small attempt (more some guidance) to fix #1571.
On the first line,
applySelectionOnTargetProvider
filters the collection based on what was selected on the frontend. When you select all and then unselect some rows, looks like this specific method does all the magic needed. The method already was there, just wasn't called.The second row,
setLimit
, is an ugly workaround, but only that way the collection is filled entirely. Without it, if you use "select all" in the grid and then the first row of this PR, the resulting collection only have 20 rows (or whatever the number of items your grid was showing). Digging a little in the code, thesearchCriteriaBuilder
should copy this from the DataProvider, but I couldn't find why it wasn't.I'm not sure if this fixes entirely, I was having the same issue in the Order Grid, identified the problem and then fixed from there. I'm also not sure if this affect some other regions of the code.
I'll be happy to provide additional information.
Thanks!