Skip to content

[QueryBuilder]: throws error in AppBuilder #15948

Open
@RivaIvanova

Description

@RivaIvanova

Description

QueryBuilderComponent tests fail, and adding the QueryBuilder itself inside a view throws Cannot read properties of undefined (reading 'fields').

The error is thrown in this.entities[0].fields https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/query-builder/query-builder-tree.component.ts#L163
because this.isAdvancedFiltering() returns true while it should be false (I think).

In isAdvancedFiltering (the last check this.entities !== this.queryBuilder?.entities) https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/query-builder/query-builder-tree.component.ts#L526

this.entities is an empty array while this.queryBuilder?.entities is undefined

I was able to reproduce it in AppBuilder. In igniteui-angular dev demos, both this.entities and this.queryBuilder?.entities are empty arrays.

  • igniteui-angular version: 19.2.x, 20.0.x
  • browser:

Steps to reproduce

  1. Use this PR https://infragistics.visualstudio.com/Indigo_Platform/_git/AppBuilder/pullrequest/16899 or update @infragistics/igniteui-angular to be at least 19.2.x in AppBuilder.
  2. Add a view and add a Query Builder.

Result

Image Image

Expected result

No errors.

Attachments

Attach a sample if available, and screenshots, if applicable.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions