fix: hide already-filtered values from other spreadsheet column filters#9386
Open
vursen wants to merge 5 commits into
Open
fix: hide already-filtered values from other spreadsheet column filters#9386vursen wants to merge 5 commits into
vursen wants to merge 5 commits into
Conversation
Each ItemFilter previously read spreadsheet.isRowHidden, which reflects the union of all column filters. Two consequences: - Filter dropdowns showed values from rows hidden by other columns as unchecked, suggesting this column was filtering them. - Applying a filter then absorbed those rows into this column's filteredRows, so clearing the other column did not bring them back. Each filter now operates only on its own filteredRows. Dropdown option lists omit values whose rows are all hidden by other columns (cosmetic). clearAllFilters refreshes option lists in a second pass so cleared siblings are reflected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
getVisibleValues now builds on getAllValues, so a column's option list no longer shows values whose rows are already hidden by other columns' filters. Refs #9329
Reuses the cross-column repro page (renamed to a general SpreadsheetFilterPage) and adds an IT that filters one column, then asserts another column's filter dropdown omits values whose rows are hidden by the first column. Refs #9329 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drive popups via SpreadsheetElement and read values via CheckboxGroupElement, and extend AbstractComponentIT directly since AbstractSpreadsheetIT's getSpreadsheet() only works with the shared demo page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.



Description
In a
SpreadsheetFilterTablewith filters on multiple columns, opening any column's filter dropdown showed values from rows already hidden by other columns as unchecked, suggesting they were filtered by this column. Re-checking them did nothing because another column still hid the row.Applying a second filter then implicitly added those already-hidden rows to the second column's
filteredRows, so clearing the first filter did not bring the rows back — the second column now also filtered them.Root cause:
ItemFilterreadspreadsheet.isRowHidden(r)for both building option lists and deciding which rows belong in its ownfilteredRows. That property reflects the union of all column filters, so each filter could not tell its own work from a sibling's.Each
ItemFilternow operates only on its ownfilteredRows. The dropdown option list omits values whose rows are all hidden by other columns via a newSpreadsheetFilterTable.getRowsHiddenByOtherFilters(self)helper.clearAllFiltersdoes a second pass to refresh option lists so cleared siblings are reflected immediately.Fixes #9329
Reproduction
Steps to reproduce:
Betain column A.Barshows up unchecked (before the fix), suggesting column B filtered it.Fooin column B.Betain column A → the row does not reappear (before the fix), because column B now also filters it.🤖 Generated with Claude Code