QueryActionsConfig
Defined in: packages/core/src/utils/queryActions.ts:50
Configuration for createQueryActions.
Extends
Properties
combinators?
optionalcombinators?:OptionList
Defined in: packages/core/src/utils/queryActions.ts:53
disabledPaths?
optionaldisabledPaths?: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?
optionalfreeze?: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?
optionalgetMatchModes?: (field:string) =>MatchModeOptions
Defined in: packages/core/src/utils/queryActions.ts:75
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
getRuleDefaultOperator?
optionalgetRuleDefaultOperator?: (field:string) =>string
Defined in: packages/core/src/utils/queryActions.ts:72
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
string
getRuleDefaultValue?
optionalgetRuleDefaultValue?: (rule:RuleType) =>any
Defined in: packages/core/src/utils/queryActions.ts:74
Parameters
| Parameter | Type |
|---|---|
rule | RuleType |
Returns
any
getValueSources?
optionalgetValueSources?: (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
| Parameter | Type |
|---|---|
field | string |
operator | string |
Returns
[{ label: string; name: ValueSource; value: ValueSource; }, ...{ label: string; name: ValueSource; value: ValueSource }[]]
idGenerator?
optionalidGenerator?: () =>string
Defined in: packages/core/src/utils/queryActions.ts:54
Returns
string
maxLevels?
optionalmaxLevels?:number
Defined in: packages/core/src/utils/queryActions.ts:56
The maximum depth at which groups may be added. Defaults to Infinity.
onAddGroup?
optionalonAddGroup?: (ruleGroup:any,parentPath:Path,query:any,context?:any) =>boolean|RuleGroupTypeAny
Defined in: packages/core/src/utils/queryActions.ts:32
Parameters
| Parameter | Type |
|---|---|
ruleGroup | any |
parentPath | Path |
query | any |
context? | any |
Returns
boolean | RuleGroupTypeAny
Inherited from
QueryActionCallbacks.onAddGroup
onAddRule?
optionalonAddRule?: (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
| Parameter | Type |
|---|---|
rule | RuleType |
parentPath | Path |
query | any |
context? | any |
Returns
boolean | RuleType<string, string, any, string, Record<string, any>>
Inherited from
QueryActionCallbacks.onAddRule
onGroupGroup?
optionalonGroupGroup?: (...args:any[]) =>boolean|RuleGroupTypeAny
Defined in: packages/core/src/utils/queryActions.ts:42
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
boolean | RuleGroupTypeAny
Inherited from
QueryActionCallbacks.onGroupGroup
onGroupRule?
optionalonGroupRule?: (...args:any[]) =>boolean|RuleGroupTypeAny
Defined in: packages/core/src/utils/queryActions.ts:41
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
boolean | RuleGroupTypeAny
Inherited from
QueryActionCallbacks.onGroupRule
onLog?
optionalonLog?: (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
| Parameter | Type |
|---|---|
payload | Record<string, any> |
Returns
void
onMoveGroup?
optionalonMoveGroup?: (...args:any[]) =>boolean|RuleGroupTypeAny
Defined in: packages/core/src/utils/queryActions.ts:40
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
boolean | RuleGroupTypeAny
Inherited from
QueryActionCallbacks.onMoveGroup
onMoveRule?
optionalonMoveRule?: (...args:any[]) =>boolean|RuleGroupTypeAny
Defined in: packages/core/src/utils/queryActions.ts:39
Parameters
| Parameter | Type |
|---|---|
...args | any[] |
Returns
boolean | RuleGroupTypeAny
Inherited from
QueryActionCallbacks.onMoveRule
onRemove?
optionalonRemove?: (ruleOrGroup:any,path:Path,query:any,context?:any) =>boolean
Defined in: packages/core/src/utils/queryActions.ts:38
Parameters
| Parameter | Type |
|---|---|
ruleOrGroup | any |
path | Path |
query | any |
context? | any |
Returns
boolean
Inherited from
qbId?
optionalqbId?:string
Defined in: packages/core/src/utils/queryActions.ts:52
Identifier included in every log payload.
queryDisabled?
optionalqueryDisabled?:boolean
Defined in: packages/core/src/utils/queryActions.ts:58
Abort every mutation, as though the entire query were disabled.
resetOnFieldChange?
optionalresetOnFieldChange?:boolean
Defined in: packages/core/src/utils/queryActions.ts:70
resetOnOperatorChange?
optionalresetOnOperatorChange?:boolean
Defined in: packages/core/src/utils/queryActions.ts:71
respectDisabled?
optionalrespectDisabled?: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.
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.