Fix/flux filters and footer alignment - #2123
Merged
Merged
Conversation
Column filters are stripped from $this->columns on dehydration, so a partial re-render triggered by a filter action (toggle/input/clear) ran before render() re-attached them, sending an empty pg-filters/inline filter fragment. Re-resolve the filters in renderOutsideFiltersPartial(), snapshotting enabledFilters to avoid duplicating the active-filter pills.
- date filter input uses w-full so it fills the grid cell like the text filters instead of w-auto - table rows use text-sm to match the header scale - footer record-count container is a flex justify-end so 'Showing ...' and pagination align to the right
Member
Author
|
@virtualtear, can you review this fix? |
Contributor
It appears random when clicking the checkboxes, per page and toggling filters.. I can't really get the exact steps to reproduce. After work tomorrow I will also look into it 👍
Also just encountered this shift.. tho this appears to be even more random to come up.
Edit: |
The outside-filters partial was wrapped by an extra <div wire:partial> in structure/table.blade.php on a full render, while partial fragments put wire:partial on the filter view root (via insertAttributesIntoHtmlRoot). The two shapes differed by one nesting level, so when a full render (e.g. select-all checkbox) morphed a DOM last touched by a partial fragment, morphdom nested the grid inside the previous grid and the filters collapsed to a single column. Move wire:partial (and the outsideFilters class) onto the filter view root and drop the wrapper, so both render paths emit the same root.
renderOutsideFiltersPartial() rebuilt the pg-pagination fragment from the
generic components.structure.footer, while a full render uses
theme_view('footer'). On outside-filter themes that override the footer
(e.g. Flux, with flux:select and a right-aligned record count) the toggle
re-render swapped in the plain markup and the footer lost its styling.
Use theme_view('footer') so both paths emit the same footer.
Contributor
|
Looks good to me now.. did not encounter any layout issues when spam clicking random elements on the page 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


⚡ PowerGrid - Pull Request
Description
...
Related Issue(s):
Documentation
This PR requires Documentation update?