Skip to main content

InsertOptions

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

Options for insert.

Properties

combinatorPreceding?

optional combinatorPreceding?: string

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

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/core/src/utils/queryTools.ts:588

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/core/src/utils/queryTools.ts:602

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/core/src/utils/queryTools.ts:608

ID generator.

Returns

string

Default

generateID

replace?

optional replace?: boolean

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

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.