add()
add<
RG>(query:RG,ruleOrGroup:RuleType<string,string,any,string> |RG,parentPathOrID:string|Path,__namedParameters:AddOptions):RG
Defined in: packages/core/src/utils/queryTools.ts:58
Adds a rule or group to a query.
Type Parameters
| Type Parameter |
|---|
RG extends RuleGroupTypeAny |
Parameters
| Parameter | Type | Description |
|---|---|---|
query | RG | The query to update. |
ruleOrGroup | RuleType<string, string, any, string> | RG | The rule or group to add. |
parentPathOrID | string | Path | Path or ID of the group to add to. |
__namedParameters | AddOptions | Options. |
Returns
RG
The new query with the rule or group added.
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.