fix(datagrid): reflect active filters in row count and pagination#1390
Merged
Conversation
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
…act a testable count plan
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.
What
Filtering a table now updates the row count and page count in the bottom-right to match the filtered result, instead of showing the whole-table totals.
How
fetchFilteredRowCount(table:filters:logicMode:)to thePluginDatabaseDriverprotocol, with a default implementation returningnilso a driver that can't count a filtered set falls back to the previous behavior.PluginDriverAdapterandDatabaseDriver; MongoDB implements it.TableQueryBuilder/QueryExecutionCoordinatoruse the filtered count to drive the footer count and pagination when a filter is active.PluginKit ABI
This adds a protocol method, so it bumps PluginKit ABI 14 to 15 (
currentPluginKitVersionplus every bundled pluginInfo.plist). ABI 14 already shipped in v0.43.2, so this is a fresh, necessary bump, not a re-bump of an unreleased version.After this merges to main, the registry plugins need rebuilding against ABI 15:
Tests
TableQueryBuilderFilterTestscovers the filtered-count query construction.