Skip to main content

QueryBuilderFlags

Defined in: packages/core/src/types/queryBuilder.ts:331

Properties​

addRuleToNewGroups?​

optional addRuleToNewGroups?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:452

Adds a new default rule automatically to each new group.

Default​

false

autoSelectField?​

optional autoSelectField?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:434

Select the first field in the array automatically.

Default​

true

autoSelectOperator?​

optional autoSelectOperator?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:440

Select the first operator in the array automatically.

Default​

true

autoSelectValue?​

optional autoSelectValue?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:446

Select the first value in the array automatically. Only applicable when the value editor renders a select list.

Default​

false

debugMode?​

optional debugMode?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:362

Enables debug logging for query builders (and React DnD when applicable).

Default​

false

enableDragAndDrop?​

optional enableDragAndDrop?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:356

Enables drag-and-drop features.

Default​

false

enableMountQueryChange?​

optional enableMountQueryChange?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:338

Set to false to avoid calling the onQueryChange callback when the component mounts.

Default​

true

listsAsArrays?​

optional listsAsArrays?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:458

Store list-type values as native arrays instead of comma-separated strings.

Default​

false

preserveQueryStateOnUnmount?​

optional preserveQueryStateOnUnmount?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:350

By default, when the last QueryBuilder component using a given qbId unmounts, its query is removed from the internal Redux store. Set this to true to retain the query state after unmount, which allows a subsequent QueryBuilder with the same qbId to pick up where the previous one left off.

Only meaningful in conjunction with an explicit qbId prop, since automatically generated qbIds are never reused.

Default​

false

resetOnFieldChange?​

optional resetOnFieldChange?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:422

Reset the operator and value when the field changes.

Default​

true

resetOnOperatorChange?​

optional resetOnOperatorChange?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:428

Reset the value when the operator changes.

Default​

false

showCloneButtons?​

optional showCloneButtons?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:397

Show the "Clone rule" and "Clone group" buttons.

Default​

false

showCombinatorsBetweenRules?​

optional showCombinatorsBetweenRules?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:369

Show group combinator selectors in the body of the group, between each child rule/group, instead of in the group header.

Default​

false

showLockButtons?​

optional showLockButtons?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:410

Show the "Lock rule" and "Lock group" buttons.

Default​

false

showMuteButtons?​

optional showMuteButtons?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:416

Show the "Mute rule" and "Mute group" buttons.

Default​

false

showNotToggle?​

optional showNotToggle?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:375

Show the "not" (aka inversion) toggle for rule groups.

Default​

false

showShiftActions?​

optional showShiftActions?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:381

Show the "Shift up"/"Shift down" actions.

Default​

false

showUndoRedo?​

optional showUndoRedo?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:391

Show the "Undo"/"Redo" actions in the header of the outermost group.

Requires the QueryBuilderHistory component from react-querybuilder/history, which provides the controls and records the history they navigate. Defaults to true when a QueryBuilderHistory ancestor is present (pass false explicitly to opt out).

Default​

false

showUngroupButtons?​

optional showUngroupButtons?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:404

Show the "Ungroup" button on each non-root group, which replaces the group with its own rules in the parent group.

Default​

false

suppressStandardClassnames?​

optional suppressStandardClassnames?: boolean

Defined in: packages/core/src/types/queryBuilder.ts:465

Prevent any assignment of standard classes to elements. This includes conditional and event-based classes for validation, drag-and-drop, etc.

Default​

false

caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.