Skip to content

Fix grid rendering issues, page size reset bug, and improve Sidebar/Sidebar2 behavior on mobile#1203

Merged
gvreddy04 merged 7 commits into
vikramlearning:mainfrom
MarcoBellini:Grid-Sidebar-Sidebar2-Fixes
Jun 22, 2026
Merged

Fix grid rendering issues, page size reset bug, and improve Sidebar/Sidebar2 behavior on mobile#1203
gvreddy04 merged 7 commits into
vikramlearning:mainfrom
MarcoBellini:Grid-Sidebar-Sidebar2-Fixes

Conversation

@MarcoBellini

Copy link
Copy Markdown
Contributor

Summary

This PR addresses several issues related to Grid behavior, filter rendering, and UI interactions across the application. It includes bug fixes, rendering improvements, and enhancements to the user experience.

Fixes & Improvements

1. PageSize Selector Bug

Issue: Changing the page size from the selector at the bottom of the table (image) caused the value to reset to 10.

Fix: Introduced a new variable (pendingPageSizeChanging) to prevent the grid from resetting the page during component rendering.

Additional: Updated and corrected the logic inside OnPageSizeChangedAsync.

2. Grid Settings Not Reflected in HTML After Load

Issue: LoadGridSettingsAsync() correctly restored saved settings, but the UI did not reflect these restored values.

Cause: Blazor prerendering caused the initial UI state to display before filters were fully loaded.

Fix: Introduced an isColumnsLoading flag to show placeholders during prerendering and display the correct filter state once loading completes.

3. Checkbox Rendering Issues in Filters

Issue: Checkbox filters were not applying the “checked” state correctly even when set to true.

Fix: Added a new RenderFragment InputFilterTemplate() in GridColumnFilter.razor.cs to handle checkbox rendering cleanly.

4. Missing async / Incorrect Task Handling

Added missing async keywords in several methods within Grid.razor.cs.

Replaced return Task.CompletedTask with proper await usage to ensure asynchronous flow behaves as expected.

5. Mobile Navigation Menu Fix

Issue: In mobile view (sidebar and sidebar2), clicking on a menu item did not close the NavMenu.

Fix: Implemented automatic closing of the navigation menu after a user selects an item.

MarcoBellini and others added 7 commits November 29, 2025 17:48
… async usage. Sidebar and Sibar2: fic mobile nav behavior

- Fixed page size reset issue when selecting PageSize from the table footer.
Introduced pendingPageSizeChanging to prevent page reset during rendering and corrected OnPageSizeChangedAsync.

- Fixed incorrect UI restore after LoadGridSettingsAsync.
Added isColumnsLoading to show a temporary placeholder during prerendering and render filters correctly afterward.

- Added InputFilterTemplate (RenderFragment) in GridColumnFilter.razor.cs to fix checkbox rendering where the checked state wasn’t applied properly.

- Added missing async keywords and replaced return Task.CompletedTask with await calls in Grid.razor.cs.

- Mobile version: added auto-close behavior for sidebar and sidebar2.
NavMenu now closes correctly after selecting a menu item
…s.PageSize): now the grid can load page numbers greater than page size.
@gvreddy04 gvreddy04 added the enhancement New feature or request label Jun 22, 2026
@gvreddy04 gvreddy04 added this to the 4.0.0 milestone Jun 22, 2026

@gvreddy04 gvreddy04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gvreddy04 gvreddy04 merged commit 5e044fe into vikramlearning:main Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants