Skip to main content

UpdateOptions

Options for update.

Properties

getRuleDefaultOperator()?

optional getRuleDefaultOperator: (field) => string

Determines the default operator name for a given field.

Parameters

ParameterType
fieldstring

Returns

string

Defined in

packages/react-querybuilder/src/utils/queryTools.ts:94


getRuleDefaultValue()?

optional getRuleDefaultValue: (rule) => any

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

Parameters

ParameterType
ruleRuleType<string, string, any, string>

Returns

any

Defined in

packages/react-querybuilder/src/utils/queryTools.ts:103


getValueSources()?

optional getValueSources: (field, operator) => ValueSources

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

Parameters

ParameterType
fieldstring
operatorstring

Returns

ValueSources

Defined in

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


resetOnFieldChange?

optional resetOnFieldChange: boolean

When updating the field of a rule, the rule's operator, value, and valueSource will be reset to their respective defaults. Defaults to true.

Defined in

packages/react-querybuilder/src/utils/queryTools.ts:85


resetOnOperatorChange?

optional resetOnOperatorChange: boolean

When updating the operator of a rule, the rule's value and valueSource will be reset to their respective defaults. Defaults to false.

Defined in

packages/react-querybuilder/src/utils/queryTools.ts:90


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.