Repository navigation
fix(admin-panel): go back to the first page when a table refresh finds its page empty - #1239
Merged
Merged
Conversation
…s its page empty After a filter reduced the results (e.g. plugins on page 7), the table showed nothing. Split out of #995. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uz47mrsSwm3hxZc7gCMxd9
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.
Split out of #995 (original commit by @OviedoMarcelo, authorship kept).
Problem
A
DataTablereloads its current page when the data service raisesDataChanged, e.g. after a filter changed. If the filtered results no longer reach that page (example: you're on page 7 of the plugins and filter down to a few entries), the refresh comes back empty. The table then showed no rows, the page number stayed at 7, and nothing indicated why.Change
If a refresh of a page beyond the first finds no entries,
DataTableloads page 1 instead.Testing
DataTableTests.RefreshOfEmptyPage_StartsOverFromFirstPage: navigates to page 3, shrinks the data to 3 items and raisesDataChanged. It expects page 1 with 3 rows. The test fails on the old component (page stays 3).dotnet test tests/MUnique.OpenMU.Web.Tests: 243/243 passed.Generated by Claude Code