Skip to main content

UpdateOptions

Defined in: packages/core/src/utils/queryTools.ts:122

Options for update.

Properties

getMatchModes?

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

Defined in: packages/core/src/utils/queryTools.ts:149

Determines the valid match modes for a given field.

Parameters

ParameterType
fieldstring

Returns

MatchModeOptions


getRuleDefaultOperator?

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

Defined in: packages/core/src/utils/queryTools.ts:136

Determines the default operator name for a given field.

Parameters

ParameterType
fieldstring

Returns

string


getRuleDefaultValue?

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

Defined in: packages/core/src/utils/queryTools.ts:145

Gets the default value for a given rule, in case the value needs to be reset.

Parameters

ParameterType
ruleRuleType

Returns

any


getValueSources?

optional getValueSources?: (field: string, operator: string) => ValueSources | ValueSourceFlexibleOptions

Defined in: packages/core/src/utils/queryTools.ts:140

Determines the valid value sources for a given field and operator.

Parameters

ParameterType
fieldstring
operatorstring

Returns

ValueSources | ValueSourceFlexibleOptions


resetOnFieldChange?

optional resetOnFieldChange?: boolean

Defined in: packages/core/src/utils/queryTools.ts:127

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?

optional resetOnOperatorChange?: boolean

Defined in: packages/core/src/utils/queryTools.ts:132

When updating the operator of a rule, the rule's value and valueSource will be reset to their respective defaults. Defaults to 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.