Remove Default condition

Is there a way to have the default component render without the first empty condition:


I need to have only the AND/OR and the buttons render by default.


Thanks!


1 Reply

GK Gayathri KarunaiAnandam Syncfusion Team August 2, 2021 01:56 PM UTC

Hi Gonzalo Urroz, 

We have checked your reported query. We can achieve your requirement by using the reset method in created event of querybuilder. Please check the below code. 

Code snippet: 

createdControl() { 
    if (Browser.isDevice) { 
      this.qbObj.summaryView = true; 
    } 
    this.qbObj.reset(); 
  } 
  render() { 
    return ( 
      <div className="control-pane"> 
        <div className="control-section"> 
          <div className="row"> 
            <div className="col-lg-12 control-section"> 
              <QueryBuilderComponent 
                width="70%" 
                dataSource={employeeData} 
                columns={this.columnData} 
                created={this.createdControl.bind(this)} 
                ref={scope => { 
                  this.qbObj = scope; 
                }} 
              /> 
            </div> 
          </div> 
        </div> 
      </div> 
    ); 
  } 
} 


For  your convenience, we have prepared a sample based on this. Please check the below link. 


Please get back to us, if you need further assistance. 

Regards, 
Gayathri K 


Loader.
Up arrow icon