Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuidePropagates the Table component's pagination trigger flag into the query options so that consumers can detect when data queries are caused by pagination changes. Sequence diagram for Table pagination-triggered data querysequenceDiagram
participant User
participant TableComponent
participant QueryOptions
participant DataProvider
User->>TableComponent: changePage(pageIndex)
activate TableComponent
TableComponent->>TableComponent: QueryData(triggerByPagination = true)
TableComponent->>QueryOptions: BuildQueryPageOptions()
activate QueryOptions
QueryOptions-->>TableComponent: queryOption
deactivate QueryOptions
TableComponent->>TableComponent: _firstQuery check
TableComponent->>QueryOptions: set IsFirstQuery = _firstQuery
TableComponent->>QueryOptions: set IsTriggerByPagination = true
TableComponent->>DataProvider: OnQueryAsync(queryOption)
activate DataProvider
DataProvider-->>TableComponent: QueryResult
deactivate DataProvider
TableComponent-->>User: render paged data
deactivate TableComponent
Updated class diagram for query options used by TableclassDiagram
class Table~TItem~ {
- bool _firstQuery
+ Task QueryData(bool triggerByPagination)
+ QueryPageOptions BuildQueryPageOptions()
}
class QueryPageOptions {
+ bool IsFirstQuery
+ bool IsTriggerByPagination
+ int PageIndex
+ int PageItems
+ string? SortName
+ bool SortOrder
+ string? SearchText
}
class DataProvider~TItem~ {
+ Task OnQueryAsync(QueryPageOptions options)
}
Table --> QueryPageOptions : builds
Table --> DataProvider : calls OnQueryAsync
DataProvider --> QueryPageOptions : reads flags
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
Fixes Issue #7753 by ensuring the Table component correctly propagates “triggered by pagination” state into the QueryPageOptions passed to OnQueryAsync, enabling consumers to distinguish pagination-driven queries.
Changes:
- Set
QueryPageOptions.IsTriggerByPaginationbased onQueryData(triggerByPagination)input.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var queryOption = BuildQueryPageOptions(); | ||
| // Set whether it is the first query | ||
| queryOption.IsFirstQuery = _firstQuery; | ||
| queryOption.IsTriggerByPagination = triggerByPagination; |
There was a problem hiding this comment.
This change fixes QueryPageOptions.IsTriggerByPagination being left at its default, but there’s currently no Table unit test asserting the flag becomes true when a user clicks a page link. Please add/extend a test (e.g., in test/UnitTest/Components/TableTest.cs, similar to ListViewTest.Pageable_Ok) that clicks a .page-link and verifies the OnQueryAsync callback receives option.IsTriggerByPagination == true.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7754 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 750 750
Lines 33269 33270 +1
Branches 4612 4612
=========================================
+ Hits 33269 33270 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #7753
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Bug Fixes: