Skip to main content

UpdateOptions

Defined in: packages/react-querybuilder/src/utils/queryTools.ts:98

Options for update.

Properties

getMatchModes()?

optional getMatchModes: (field: string) => MatchModeOptions

Defined in: packages/react-querybuilder/src/utils/queryTools.ts:125

Determines the valid match modes for a given field.

Parameters

ParameterType
fieldstring

Returns

MatchModeOptions


getRuleDefaultOperator()?

optional getRuleDefaultOperator: (field: string) => string

Defined in: packages/react-querybuilder/src/utils/queryTools.ts:112

Determines the default operator name for a given field.

Parameters

ParameterType
fieldstring

Returns

string


getRuleDefaultValue()?

optional getRuleDefaultValue: (rule: RuleType) => any

Defined in: packages/react-querybuilder/src/utils/queryTools.ts:121

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/react-querybuilder/src/utils/queryTools.ts:116

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/react-querybuilder/src/utils/queryTools.ts:103

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/react-querybuilder/src/utils/queryTools.ts:108

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.