Skip to main content

UpdateMethod()

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

Call Signature

UpdateMethod<RG>(query: RG, prop: UpdateableProperties, value: any, pathOrID: string | Path, options?: UpdateOptions): RG

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

Updates a single property of a rule or group.

Type Parameters

Type Parameter
RG extends RuleGroupTypeAny

Parameters

ParameterTypeDescription
queryRGThe query to update.
propUpdateablePropertiesThe name of the property to update.
valueanyThe new value of the property.
pathOrIDstring | PathThe path or ID of the rule or group to update.
options?UpdateOptionsOptions.

Returns

RG

Call Signature

UpdateMethod<RG>(query: RG, props: UpdateableProperties[], values: any[], pathOrID: string | Path, options?: UpdateOptions): RG

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

Updates multiple properties of a rule or group using parallel arrays of property names and corresponding values.

Type Parameters

Type Parameter
RG extends RuleGroupTypeAny

Parameters

ParameterTypeDescription
queryRGThe query to update.
propsUpdateableProperties[]The names of the properties to update.
valuesany[]The new values, in the same order as props.
pathOrIDstring | PathThe path or ID of the rule or group to update.
options?UpdateOptionsOptions.

Returns

RG

Call Signature

UpdateMethod<RG>(query: RG, props: UpdateValueMap, pathOrID: string | Path, options?: UpdateOptions): RG

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

Updates multiple properties of a rule or group using a map of property names to their new values.

Type Parameters

Type Parameter
RG extends RuleGroupTypeAny

Parameters

ParameterTypeDescription
queryRGThe query to update.
propsUpdateValueMapA map of property names to their new values.
pathOrIDstring | PathThe path or ID of the rule or group to update.
options?UpdateOptionsOptions.

Returns

RG


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.