Skip to main content

insert()

insert<RG>(query: RG, ruleOrGroup: RuleType<string, string, any, string> | RG, path: number[], __namedParameters: InsertOptions): RG

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

Inserts a rule or group into a query.

Type Parameters

Type Parameter
RG extends RuleGroupTypeAny

Parameters

ParameterTypeDescription
queryRGThe query to update.
ruleOrGroupRuleType<string, string, any, string> | RGThe rule or group to insert.
pathnumber[]Path at which to insert the rule or group.
__namedParametersInsertOptionsOptions.

Returns

RG

The new query with the rule or group inserted.


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.