Skip to content

Grid throws if passed an expressionTree with a field name that does not exist in Grid. #15563

@hanastasov

Description

@hanastasov

Description

Grid supports accepting a FilteringExpressionsTree with missing logic function. The grid will recreate the logic based on the field it refers to.

However, if such field does not exist in the grid data, condition logic will not be recreated (Expected). Still, the grid will try to call condigion.logic without verifying it does exist

  • igniteui-angular version: 19.1.4

Steps to reproduce

  1. Add grid

  2. Pass the following filteringExpressionsTree:
    grid.advancedFilteringExpressionsTree = JSON.parse('{"filteringOperands":[{"fieldName":"Missing","condition":{"name":"notEmpty","isUnary":true,"iconName":"filter_not_empty"},"conditionName":"notEmpty","ignoreCase":true,"searchVal":null,"searchTree":null}],"operator":0,"returnFields":[],"type":1}')

  3. Grid throws:
    cond.logic is not a function

Result

the filtering strategy should return false when trying to find a value in a field, which does not exist. Should try to call the condigion logic function to check a value.

Image

Expected result

Grid should appear empty, because for every record, false would have been returned by the filtering strategy
AdvancedFilteringDialog should still display the filtering expression:

Image

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions