After installing Query you can create it on a page.
To initialize Query provide the following configuration:
webix.ui({
view: "query",
id: "query",
data: data,
fields: [
{ id: "first_name", value: "First Name", type: "text" },
{ id: "last_name", value: "Last Name", type: "text" },
// other fields
],
value: { /*filtering rules and fields combinations*/ }
});
Related sample: Query: Initialization
By default Query arranges rules in a column but you can rearrange them in a row, like the following:
To do this set the type property to "bar":
Setting toolbar mode
webix.ui({
view: "query",
id: "query",
// display rules as a toolbar
type: "bar",
fields: [ /*fields for filtering*/ ],
value: { /*filtering rules and fields combinations*/ }
});
Related sample: Query: Toolbar Mode
The simple mode hides the context menu of the rule thus preventing users from adding new filters, but they can still edit the existing ones by double clicking the panels.
You can switch to the simple mode by setting the simple property to true:
webix.ui({
view: "query",
id: "query",
// switch to the simple mode
simple: true,
fields: [ /*fields for filtering*/ ],
value: { /*filtering rules and fields combinations*/ }
});
Related sample: Query: Simple mode
Back to top