Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### Bug fixes

- Fix: ensure primary actions are not wrapped in the list layout. [#73333](https://github.com/WordPress/gutenberg/pull/73333)
- Fix: DataViews consistently opens filter section on clicking Add Filter via column header. [#72998](https://github.com/WordPress/gutenberg/pull/72998)

## 10.3.0 (2025-11-12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Icon,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { forwardRef, Children, Fragment } from '@wordpress/element';
import { forwardRef, Children, Fragment, useContext } from '@wordpress/element';

/**
* Internal dependencies
Expand All @@ -27,6 +27,7 @@ import type {
ViewPickerTable as ViewPickerTableType,
Operator,
} from '../../types';
import DataViewsContext from '../../components/dataviews-context';

const { Menu } = unlock( componentsPrivateApis );

Expand Down Expand Up @@ -72,6 +73,8 @@ const _HeaderMenu = forwardRef( function HeaderMenu< Item >(
let operators: Operator[] = [];
const field = fields.find( ( f ) => f.id === fieldId );

const { setIsShowingFilter } = useContext( DataViewsContext );

if ( ! field ) {
// No combined or regular field found.
return null;
Expand Down Expand Up @@ -168,6 +171,7 @@ const _HeaderMenu = forwardRef( function HeaderMenu< Item >(
prefix={ <Icon icon={ funnel } /> }
onClick={ () => {
setOpenedFilter( fieldId );
setIsShowingFilter( true );
onChangeView( {
...view,
page: 1,
Expand Down
Loading