Skip to main content

QueryActionsConfig

Defined in: packages/core/src/utils/queryActions.ts:50

Configuration for createQueryActions.

Extends

Properties

combinators?

optional combinators?: OptionList

Defined in: packages/core/src/utils/queryActions.ts:53


disabledPaths?

optional disabledPaths?: Path[]

Defined in: packages/core/src/utils/queryActions.ts:69

Paths disabled by position rather than by a disabled property on the node itself, mirroring the array form of the QueryBuilder disabled prop. Honored only when respectDisabled is true; as with the disabled property, a node's own disabled can always be changed.


freeze?

optional freeze?: boolean

Defined in: packages/core/src/utils/queryActions.ts:86

Set false to skip immer's auto-freeze on the queries these handlers return, matching the option of the same name on the query tools and QueryManager.

Deep-freezing throws on the reactive proxies used by signals-based frameworks (Svelte $state, Vue reactive), so an adapter whose storage may hand a proxied query to these handlers has to turn it off.

Default

true

getMatchModes?

optional getMatchModes?: (field: string) => MatchModeOptions

Defined in: packages/core/src/utils/queryActions.ts:75

Parameters

ParameterType
fieldstring

Returns

MatchModeOptions


getRuleDefaultOperator?

optional getRuleDefaultOperator?: (field: string) => string

Defined in: packages/core/src/utils/queryActions.ts:72

Parameters

ParameterType
fieldstring

Returns

string


getRuleDefaultValue?

optional getRuleDefaultValue?: (rule: RuleType) => any

Defined in: packages/core/src/utils/queryActions.ts:74

Parameters

ParameterType
ruleRuleType

Returns

any


getValueSources?

optional getValueSources?: (field: string, operator: string) => [{ label: string; name: ValueSource; value: ValueSource; }, ...{ label: string; name: ValueSource; value: ValueSource }[]]

Defined in: packages/core/src/utils/queryActions.ts:73

Parameters

ParameterType
fieldstring
operatorstring

Returns

[{ label: string; name: ValueSource; value: ValueSource; }, ...{ label: string; name: ValueSource; value: ValueSource }[]]


idGenerator?

optional idGenerator?: () => string

Defined in: packages/core/src/utils/queryActions.ts:54

Returns

string


maxLevels?

optional maxLevels?: number

Defined in: packages/core/src/utils/queryActions.ts:56

The maximum depth at which groups may be added. Defaults to Infinity.


onAddGroup?

optional onAddGroup?: (ruleGroup: any, parentPath: Path, query: any, context?: any) => boolean | RuleGroupTypeAny

Defined in: packages/core/src/utils/queryActions.ts:32

Parameters

ParameterType
ruleGroupany
parentPathPath
queryany
context?any

Returns

boolean | RuleGroupTypeAny

Inherited from

QueryActionCallbacks.onAddGroup


onAddRule?

optional onAddRule?: (rule: RuleType, parentPath: Path, query: any, context?: any) => boolean | RuleType<string, string, any, string, Record<string, any>>

Defined in: packages/core/src/utils/queryActions.ts:31

Parameters

ParameterType
ruleRuleType
parentPathPath
queryany
context?any

Returns

boolean | RuleType<string, string, any, string, Record<string, any>>

Inherited from

QueryActionCallbacks.onAddRule


onGroupGroup?

optional onGroupGroup?: (...args: any[]) => boolean | RuleGroupTypeAny

Defined in: packages/core/src/utils/queryActions.ts:42

Parameters

ParameterType
...argsany[]

Returns

boolean | RuleGroupTypeAny

Inherited from

QueryActionCallbacks.onGroupGroup


onGroupRule?

optional onGroupRule?: (...args: any[]) => boolean | RuleGroupTypeAny

Defined in: packages/core/src/utils/queryActions.ts:41

Parameters

ParameterType
...argsany[]

Returns

boolean | RuleGroupTypeAny

Inherited from

QueryActionCallbacks.onGroupRule


onLog?

optional onLog?: (payload: Record<string, any>) => void

Defined in: packages/core/src/utils/queryActions.ts:88

Receives a structured event for every action, applied or aborted.

Parameters

ParameterType
payloadRecord<string, any>

Returns

void


onMoveGroup?

optional onMoveGroup?: (...args: any[]) => boolean | RuleGroupTypeAny

Defined in: packages/core/src/utils/queryActions.ts:40

Parameters

ParameterType
...argsany[]

Returns

boolean | RuleGroupTypeAny

Inherited from

QueryActionCallbacks.onMoveGroup


onMoveRule?

optional onMoveRule?: (...args: any[]) => boolean | RuleGroupTypeAny

Defined in: packages/core/src/utils/queryActions.ts:39

Parameters

ParameterType
...argsany[]

Returns

boolean | RuleGroupTypeAny

Inherited from

QueryActionCallbacks.onMoveRule


onRemove?

optional onRemove?: (ruleOrGroup: any, path: Path, query: any, context?: any) => boolean

Defined in: packages/core/src/utils/queryActions.ts:38

Parameters

ParameterType
ruleOrGroupany
pathPath
queryany
context?any

Returns

boolean

Inherited from

QueryActionCallbacks.onRemove


qbId?

optional qbId?: string

Defined in: packages/core/src/utils/queryActions.ts:52

Identifier included in every log payload.


queryDisabled?

optional queryDisabled?: boolean

Defined in: packages/core/src/utils/queryActions.ts:58

Abort every mutation, as though the entire query were disabled.


resetOnFieldChange?

optional resetOnFieldChange?: boolean

Defined in: packages/core/src/utils/queryActions.ts:70


resetOnOperatorChange?

optional resetOnOperatorChange?: boolean

Defined in: packages/core/src/utils/queryActions.ts:71


respectDisabled?

optional respectDisabled?: boolean

Defined in: packages/core/src/utils/queryActions.ts:63

Honor disabled properties within the query. Defaults to true, matching the QueryBuilder component; a node's own disabled property can always be changed.


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.