Hello,
We are using the query builder within a component that is housed within a mat-tab-group. There are two tabs, the Settings tab (which contains other fields and data), and the Rules tab, which is where the component that contains the query builder is located. Upon loading these tabs, the Settings tab is focused, so the query builder does not get rendered in the html.
However, the criteria-builder component is loading regardless of whether that tab is focused or not, so on initial load, it attempts a setRulesFromSql using an input sql query string. That is when we get this error:
It seems like the issue here is that it tries to do dropdownTree.element for the field dropdown when setting the query, but the element is null, so it throws this error and the query builder does not load properly. When I switch over to the tab that contains the query builder, this is what I see:
The query I was attempting was a simple one, like "(NameField = 'test')".
Is there something we can do to ensure it gets set up properly when using the setRulesFromSql method if it is on a non-focused tab?
Thank you,
KS