Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Rise™.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
December 13, 2023
This library adopts a configuration-driven approach. The config defines supported value types, operators, rendering, importing, and exporting. Refer to the config for the complete documentation.
To implement the string ‘contains’ functionality, you can create a custom operator as shown below.
NOTE:
Starting from version 6, the library has been modularized into separate packages. Therefore, if you are using a version older than 6, simply update your imports accordingly:
// For versions 6 and above import { BasicConfig } from '@react-awesome-query-builder/ui'; // For versions prior to 6 import { BasicConfig } from 'react-awesome-query-builder';
BasicConfig.operators.contains = { label: "contains", labelForFormat: "contains", reversedOp: "not_like", sqlOp: "LIKE", valueSources: ["value"], cardinality: 1 }; BasicConfig.types.text = { ...BasicConfig.types.text, widgets: { ...BasicConfig.types.text.widgets, text: { ...BasicConfig.types.text.widgets.text, operators: [...BasicConfig.types.text.widgets.text.operators, "contains"] } } }; const config = { ...BasicConfig, fields: { name: { label: "Name", type: "text", operators: ["contains"] } } };