Skip to main content

UpdateMethod()

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

Call Signature​

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

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

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 extends RuleGroupTypeAny>(query: RG, props: UpdateableProperties[], values: any[], pathOrID: string | Path, options?: UpdateOptions): RG

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

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 extends RuleGroupTypeAny>(query: RG, props: UpdateValueMap, pathOrID: string | Path, options?: UpdateOptions): RG

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

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.