Skip to content

fix(grid): keep conditionName in sync on condition changed callback [20.1.x]#16924

Open
hanastasov wants to merge 1 commit into20.1.xfrom
keep-conditionName-synced-20.1.x
Open

fix(grid): keep conditionName in sync on condition changed callback [20.1.x]#16924
hanastasov wants to merge 1 commit into20.1.xfrom
keep-conditionName-synced-20.1.x

Conversation

@hanastasov
Copy link
Contributor

@hanastasov hanastasov commented Feb 18, 2026

Closes #16841

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

Copy link
Contributor

Copilot AI left a comment

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 a bug where the conditionName property in filtering expressions was not being synchronized when users changed the filter condition through the UI. The fix ensures that whenever the condition is updated via the condition dropdown, both condition (the operation object) and conditionName (the string identifier) are updated together.

Changes:

  • Updated onConditionsChanged callbacks in two filtering components to sync conditionName with condition
  • Enhanced test helper function to verify both condition.name and conditionName are in sync
  • Added test assertions to verify the fix works correctly when changing conditions in the filtering row UI

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.ts Added conditionName sync in onConditionsChanged for the filtering row component
projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-default-expression.component.ts Added conditionName sync in onConditionsChanged for the Excel-style filtering component
projects/igniteui-angular/src/lib/grids/grid/grid-filtering-ui.spec.ts Updated test helper to verify conditionName and added assertions to test condition changes

public onConditionsChanged(eventArgs: any) {
const value = (eventArgs.newSelection as IgxSelectComponent).value;
this.expressionUI.expression.condition = this.getCondition(value);
this.expressionUI.expression.conditionName = value;
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

Consider adding a test case that verifies the conditionName is correctly synced when changing conditions in the Excel-style custom filter dialog, similar to the test coverage added for the filtering row component at lines 150-153 and 163-166. This would ensure the fix in excel-style-default-expression.component.ts is properly tested.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 91.694%. remained the same
when pulling f63ef35 on keep-conditionName-synced-20.1.x
into 93d144f on 20.1.x.

@hanastasov hanastasov changed the title fix(grid): keep conditionName in sync on condition changed callback fix(grid): keep conditionName in sync on condition changed callback [20.1.x] Feb 18, 2026
Copy link
Contributor

Copilot AI commented Feb 19, 2026

@hanastasov I've opened a new pull request, #16933, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grid State - Extracted filter column state is always set to "contains"

4 participants

Comments