Hello,
Is it possible to use the query builder with a DataManager based on an ODataV4 DataAdapter?
If, yes, what should I set the dataSource of the query builder to in JSX?
Currently I have a Grid whose DataSource is bound to the data manager. Everything is fine on that side.
When I add the query builder with the datasource set to the same one as the grid, it dosen't show up (the query builder). On the console I get the following error
adaptors.js:600 Uncaught TypeError: Cannot read property 'indexOf' of undefined
at ODataV4Adaptor.UrlAdaptor.processQuery (adaptors.js:600)
at DataManager.executeLocal (manager.js:143)
at QueryBuilderComponent.QueryBuilder.render (query-builder.js:2901)
at QueryBuilderComponent.render (querybuilder.component.js:54)
at QueryBuilderComponent.Component.appendTo (component.js:185)
at QueryBuilderComponent.ComponentBase.renderReactComponent (component-base.js:94)
When I set the dataSource to null it shows up but when the ruleChange event fires and try the same code as your public demo(although with a different set of columns) Iget 2 errors. The first's stack tract is :
Uncaught TypeError: Cannot read property 'toJson' of null
at ODataV4Adaptor.UrlAdaptor.processQuery (adaptors.js:524)
at DataManager.executeQuery (manager.js:200)
at Data.executeQuery (data.js:467)
at Data.insert (data.js:449)
at Data.getData (data.js:439)
at Render.refreshDataManager (render.js:224)
at Observer.<anonymous> (render.js:130)
at Observer.notify (observer.js:131)
at GridComponent.ComponentBase.trigger (component-base.js:198)
at Render.refresh (render.js:97)
at GridComponent.Grid.refresh (grid.js:2329)
at QueryBuilderComponent.ListComponent.queryBuilderRuleChange (ListComponent.js:131)
at Observer.notify (observer.js:127)
at QueryBuilderComponent.ComponentBase.trigger (component-base.js:198)
at QueryBuilderComponent.QueryBuilder.filterRules (query-builder.js:2249)
at QueryBuilderComponent.QueryBuilder.updateRules (query-builder.js:2233)
at QueryBuilderComponent.QueryBuilder.changeValueSuccessCallBack (query-builder.js:1177)
at Observer.<anonymous> (query-builder.js:1168)
at Observer.notify (observer.js:109)
at QueryBuilderComponent.ComponentBase.trigger (component-base.js:198)
at QueryBuilderComponent.QueryBuilder.filterValue (query-builder.js:1167)
at QueryBuilderComponent.QueryBuilder.changeValue (query-builder.js:1150)
at Observer.notify (observer.js:127)
at TextBox.Base.trigger (base.js:184)
at TextBox.inputHandler (textbox.js:531)
The second's stacktrace is :
adaptors.js:524 Uncaught TypeError: Cannot read property 'toJson' of null
at ODataV4Adaptor.UrlAdaptor.processQuery (adaptors.js:524)
at DataManager.executeQuery (manager.js:200)
at Data.executeQuery (data.js:467)
at Data.insert (data.js:449)
at Data.getData (data.js:439)
at Render.refreshDataManager (render.js:224)
at Observer.<anonymous> (render.js:130)
at Observer.notify (observer.js:131)
at GridComponent.ComponentBase.trigger (component-base.js:198)
at Render.refresh (render.js:97)
at Observer.notify (observer.js:127)
at GridComponent.Component.notify (component.js:265)
at GridComponent.Grid.onPropertyChanged (grid.js:1210)
at GridComponent.Base.dataBind (base.js:124)
at GridComponent.Component.dataBind (component.js:211)
at messageHandler (util.js:42)
Can you help with this?