-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataViews: open the filters from the column table consistently #72998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
oandregal
merged 6 commits into
WordPress:trunk
from
hbhalodia:fix/issue-72986-dataviews
Nov 21, 2025
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5d4f957
Fix: Inconsistent behavior for add filters in DataViews
hbhalodia 9ba8a9d
Add changelog entry
hbhalodia 739be87
Merge branch 'trunk' into fix/issue-72986-dataviews
hbhalodia d3524e4
Update to use useRef instead of useState
hbhalodia 600a862
Merge branch 'trunk' into fix/issue-72986-dataviews
hbhalodia e6489c1
GH-72986 Use setIsShowingFilter in column header with DataViews context
hbhalodia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if a better fix would be to just call this in table column header's
add filterhere. WDYT @oandregal ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ntsekouras, I tried that but setting explicitly there I thought was not better, even in filter's if you log the isShowingFilter, it is correctly showing the state, but only on initial filter check even it logs true, still it does not opens the filter panel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, updating the state in the table layout sounds better. Was there any issue with that approach, @hbhalodia ? I see the
setIsShowingFilterfunction is already in the context, so available in the layout as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was not something with approach, We can set that explicitly in the column header, but my concern was, it was not working on first refresh, but thereafter it was working as expected, so updating the state in column header component wouldn't be a solution just to add a fix for this and explicitly adding to that component.
I can update the PR with tha approach (it was my first approach) but then thought of this, hence changed to that.
Updating the PR with the setting state via column header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @oandregal, This is now updated, to use context within column-header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @oandregal @ntsekouras, Can you please take a look on PR. Updated it with the required changes.
Thank You 🙇,