Skip to content

T1331971: DataGrid - Filter Panel and Filter Row values are not synchronized when applyFilter="onClick" - #34404

Merged
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:fix/datagrid-filter-panel-row-sync-onclick
Jul 22, 2026
Merged

T1331971: DataGrid - Filter Panel and Filter Row values are not synchronized when applyFilter="onClick"#34404
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:fix/datagrid-filter-panel-row-sync-onclick

Conversation

@bit-byte0

Copy link
Copy Markdown
Contributor

What

DataGrid now keeps the filter row value in sync with the filter panel when filterRow.applyFilter is onClick

How

The filter synchronization resets the buffered filter row value so the editor reflects the latest applied filterValue instead of a stale pending value

Copilot AI review requested due to automatic review settings July 21, 2026 08:51
@bit-byte0
bit-byte0 requested a review from a team as a code owner July 21, 2026 08:51
@bit-byte0 bit-byte0 added the 26_2 label Jul 21, 2026
@bit-byte0 bit-byte0 self-assigned this Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes DataGrid filter synchronization when filterRow.applyFilter = "onClick" by ensuring the Filter Row editor reflects the latest applied filterValue (e.g., from the Filter Panel) rather than keeping a stale buffered (pending) value.

Changes:

  • Clear bufferedFilterValue / bufferedSelectedFilterOperation during filter sync so the Filter Row editor updates to the currently applied condition.
  • Minor cleanup/refactor in filter sync logic (remove that alias; simplify ternary assignments).
  • Add an integration test covering Filter Row editor updates after consecutive filterValue changes in onClick mode (T1331971).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_sync.ts Resets buffered Filter Row column options during sync so onClick mode editors don’t keep stale pending values.
packages/devextreme/js/__internal/grids/grid_core/filter/tests/m_filter_row.integration.test.ts Adds a regression integration test asserting the Filter Row text editor updates after filter changes (T1331971).

@Alyar666
Alyar666 self-requested a review July 22, 2026 08:31
filterRowOptions = {
filterValue,
selectedFilterOperation,
bufferedFilterValue: undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to reset these properties here? They will be restored later in the editor handler anyway (at least bufferedFilterValue will be).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's actually necessary. The reset is what lets the editor read the freshly-synced filterValue during that same columnOption change; without it getColumnFilterValue returns the stale buffered value and the editor never updates - this is our bug. Yes, the editor handler re-writes bufferedFilterValue afterwards, but to the new filterValue and bufferedSelectedFilterOperation is not restored by that handler, so its reset is clearly needed. Actually the regression test covers this exact path

});

describe('sync with filter panel when applyFilter is onClick (T1331971)', () => {
it('should update the filter row editor when the condition is changed via the filter panel', async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a test for filter reset.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copilot AI review requested due to automatic review settings July 22, 2026 09:40
Alyar666
Alyar666 previously approved these changes Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 22, 2026 09:53
@bit-byte0
bit-byte0 force-pushed the fix/datagrid-filter-panel-row-sync-onclick branch from ac441dc to e30ea85 Compare July 22, 2026 09:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@bit-byte0
bit-byte0 added this pull request to the merge queue Jul 22, 2026
Merged via the queue into DevExpress:main with commit 6c375af Jul 22, 2026
101 checks passed
@bit-byte0
bit-byte0 deleted the fix/datagrid-filter-panel-row-sync-onclick branch July 22, 2026 11:21
ajivanyandev pushed a commit that referenced this pull request Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants