Skip to main content

InsertOptions

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

Options for insert.

Properties

combinatorPreceding?

optional combinatorPreceding: string

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

If the query extends RuleGroupTypeIC (i.e. the query has independent combinators), then this combinator will be inserted before the new rule/group if the parent group is not empty and the new rule/group is not the first in the group (path.at(-1) > 0). This option will supersede combinators.


combinators?

optional combinators: OptionList

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

If the query extends RuleGroupTypeIC (i.e. the query has independent combinators), then the first combinator in this list will be inserted before the new rule/group if the parent group is not empty. This option is overridden by combinatorPreceding.


combinatorSucceeding?

optional combinatorSucceeding: string

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

If the query extends RuleGroupTypeIC (i.e. the query has independent combinators), then this combinator will be inserted after the new rule/group if the parent group is not empty and the new rule/group is the first in the group (path.at(-1) === 0). This option will supersede combinators.


idGenerator()?

optional idGenerator: () => string

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

ID generator.

Returns

string

Default

generateID

replace?

optional replace: boolean

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

When true, the new rule/group will replace the rule/group at path.


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.