UpdateOptions
Defined in: packages/core/src/utils/queryTools.ts:305
Options for update.
Extends
Properties
disabledPaths?
optionaldisabledPaths?:Path[]
Defined in: packages/core/src/utils/queryTools.ts:108
Paths that are disabled without the corresponding rule or group carrying a disabled
property, mirroring the array form of the QueryBuilder disabled prop. A path is treated
as disabled if it appears here or descends from a path that does.
Like the disabled property, this is only honored when respectDisabled is true, and
updating a rule or group's own disabled property is still permitted.
Inherited from
QueryToolOptions.disabledPaths
freeze?
optionalfreeze?:boolean
Defined in: packages/core/src/utils/queryTools.ts:145
Set false to skip immer's auto-freeze on the returned query, e.g. when the query will be
handed to a framework that wraps it in a proxy (Vue reactive, Solid stores) or otherwise
needs to mutate it. Ignored by the *InPlace variants, which never freeze.
Default
true
Inherited from
getMatchModes?
optionalgetMatchModes?: (field:string) =>MatchModeOptions
Defined in: packages/core/src/utils/queryTools.ts:332
Determines the valid match modes for a given field.
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
getRuleDefaultOperator?
optionalgetRuleDefaultOperator?: (field:string) =>string
Defined in: packages/core/src/utils/queryTools.ts:319
Determines the default operator name for a given field.
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
string
getRuleDefaultValue?
optionalgetRuleDefaultValue?: (rule:RuleType) =>any
Defined in: packages/core/src/utils/queryTools.ts:328
Gets the default value for a given rule, in case the value needs to be reset.
Parameters
| Parameter | Type |
|---|---|
rule | RuleType |
Returns
any
getValueSources?
optionalgetValueSources?: (field:string,operator:string) =>ValueSources| [FlexibleOption,...FlexibleOption[]]
Defined in: packages/core/src/utils/queryTools.ts:323
Determines the valid value sources for a given field and operator.
Parameters
| Parameter | Type |
|---|---|
field | string |
operator | string |
Returns
ValueSources | [FlexibleOption, ...FlexibleOption[]]
maxLevels?
optionalmaxLevels?:number
Defined in: packages/core/src/utils/queryTools.ts:115
The maximum depth at which a group may be added. A group whose parent path is already this
deep is rejected by add and insert. Rules are unaffected. Defaults to Infinity.
Inherited from
onAbort?
optionalonAbort?: (info:AbortInfo) =>void
Defined in: packages/core/src/utils/queryTools.ts:129
Called when the operation returns the query unmodified, with the reason why. Query tools never throw, so this is the only way to distinguish "the target was invalid" from "the operation had nothing to do".
Parameters
| Parameter | Type |
|---|---|
info | AbortInfo |
Returns
void
Inherited from
queryDisabled?
optionalqueryDisabled?:boolean
Defined in: packages/core/src/utils/queryTools.ts:110
Abort every mutation, as though the entire query were disabled. Defaults to false.
Inherited from
QueryToolOptions.queryDisabled
resetOnFieldChange?
optionalresetOnFieldChange?:boolean
Defined in: packages/core/src/utils/queryTools.ts:310
When updating the field of a rule, the rule's operator, value, and valueSource
will be reset to their respective defaults. Defaults to true.
resetOnOperatorChange?
optionalresetOnOperatorChange?:boolean
Defined in: packages/core/src/utils/queryTools.ts:315
When updating the operator of a rule, the rule's value and valueSource
will be reset to their respective defaults. Defaults to false.
respectDisabled?
optionalrespectDisabled?:boolean
Defined in: packages/core/src/utils/queryTools.ts:99
Abort when the target (or its parent, for add/insert) is disabled, either directly or
by descending from a disabled group. Defaults to false.
Updating a rule or group's own disabled property is always permitted, since it is the
only way to re-enable it.
Inherited from
QueryToolOptions.respectDisabled
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.