Skip to main content

QueryBuilderContextProps<F, O>

Defined in: packages/react-querybuilder/src/types/props.ts:737

Props passed down through context from a QueryBuilderContextProvider.

Extends

Extended by

Type Parameters

Type ParameterDefault type
F extends FullFieldFullField
O extends stringstring

Properties

addRuleToNewGroups?

optional addRuleToNewGroups: boolean

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

Adds a new default rule automatically to each new group.

Default

false

Inherited from

QueryBuilderFlags.addRuleToNewGroups


autoSelectField?

optional autoSelectField: boolean

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

Select the first field in the array automatically.

Default

true

Inherited from

QueryBuilderFlags.autoSelectField


autoSelectOperator?

optional autoSelectOperator: boolean

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

Select the first operator in the array automatically.

Default

true

Inherited from

QueryBuilderFlags.autoSelectOperator


autoSelectValue?

optional autoSelectValue: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.autoSelectValue


controlClassnames?

optional controlClassnames: Partial<Classnames>

Defined in: packages/react-querybuilder/src/types/props.ts:749

This can be used to assign specific CSS classes to various controls that are rendered by QueryBuilder.


controlElements?

optional controlElements: Partial<{ actionElement: ComponentType<ActionProps>; addGroupAction: ComponentType<ActionProps> | null; addRuleAction: ComponentType<ActionProps> | null; cloneGroupAction: ComponentType<ActionProps> | null; cloneRuleAction: ComponentType<ActionProps> | null; combinatorSelector: ComponentType<CombinatorSelectorProps> | null; dragHandle: ForwardRefExoticComponent<DragHandleProps & RefAttributes<HTMLElement>> | null; fieldSelector: ComponentType<FieldSelectorProps<F>> | null; inlineCombinator: ComponentType<InlineCombinatorProps> | null; lockGroupAction: ComponentType<ActionProps> | null; lockRuleAction: ComponentType<ActionProps> | null; matchModeEditor: ComponentType<MatchModeEditorProps> | null; muteGroupAction: ComponentType<ActionProps> | null; muteRuleAction: ComponentType<ActionProps> | null; notToggle: ComponentType<NotToggleProps> | null; operatorSelector: ComponentType<OperatorSelectorProps> | null; removeGroupAction: ComponentType<ActionProps> | null; removeRuleAction: ComponentType<ActionProps> | null; rule: ComponentType<RuleProps<string, string>>; ruleGroup: ComponentType<RuleGroupProps<F, O>>; ruleGroupBodyElements: ComponentType<RuleGroupProps<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }, string> & UseRuleGroup>; ruleGroupHeaderElements: ComponentType<RuleGroupProps<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }, string> & UseRuleGroup>; shiftActions: ComponentType<ShiftActionsProps> | null; valueEditor: ComponentType<ValueEditorProps<F, O>> | null; valueSelector: ComponentType<ValueSelectorProps<{[key: string]: unknown; disabled?: boolean; label: string; name: string; value: string; }>>; valueSourceSelector: ComponentType<ValueSourceSelectorProps> | null; }>

Defined in: packages/react-querybuilder/src/types/props.ts:744

Defines replacement components.


debugMode?

optional debugMode: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.debugMode


enableDragAndDrop?

optional enableDragAndDrop: boolean

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

Enables drag-and-drop features.

Default

false

Inherited from

QueryBuilderFlags.enableDragAndDrop


enableMountQueryChange?

optional enableMountQueryChange: boolean

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

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

Default

true

Inherited from

QueryBuilderFlags.enableMountQueryChange


listsAsArrays?

optional listsAsArrays: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.listsAsArrays


resetOnFieldChange?

optional resetOnFieldChange: boolean

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

Reset the operator and value when the field changes.

Default

true

Inherited from

QueryBuilderFlags.resetOnFieldChange


resetOnOperatorChange?

optional resetOnOperatorChange: boolean

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

Reset the value when the operator changes.

Default

false

Inherited from

QueryBuilderFlags.resetOnOperatorChange


showCloneButtons?

optional showCloneButtons: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showCloneButtons


showCombinatorsBetweenRules?

optional showCombinatorsBetweenRules: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showCombinatorsBetweenRules


showLockButtons?

optional showLockButtons: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showLockButtons


showMuteButtons?

optional showMuteButtons: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showMuteButtons


showNotToggle?

optional showNotToggle: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showNotToggle


showShiftActions?

optional showShiftActions: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.showShiftActions


suppressStandardClassnames?

optional suppressStandardClassnames: boolean

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

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

Default

false

Inherited from

QueryBuilderFlags.suppressStandardClassnames


translations?

optional translations: Partial<Translations>

Defined in: packages/react-querybuilder/src/types/props.ts:754

This can be used to override translatable texts applied to the various controls that are rendered by QueryBuilder.


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.