Skip to main content

update()

update<RG>(query, prop, value, path, __namedParameters): RG

Updates a property of a rule or group within a query.

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.
pathPathThe path of the rule or group to update.
__namedParametersUpdateOptionsOptions.

Returns

RG

The new query with the rule or group property updated.

Defined in

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


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.