Skip to content

Commit beca306

Browse files
authored
Remove reference to obsolete findRulemethod and link to findPath docs instead
1 parent c53d1b1 commit beca306

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/querybuilder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ This function returns the default value for new rules.
538538

539539
`(rule: RuleType, parentPath: number[], query: RuleGroupTypeAny) => RuleType | false`
540540

541-
This callback is invoked before a new rule is added. The function should either manipulate the rule and return it as an object of type `RuleType`, or return `false` to cancel the addition of the rule. You can use `findRule(parentId, query)` to locate the parent group to which the new rule will be added among the entire query hierarchy.
541+
This callback is invoked before a new rule is added. The function should either manipulate the rule and return it as an object of type `RuleType`, or return `false` to cancel the addition of the rule. You can use [`findPath`](./misc#findpath) to locate the parent group to which the new rule will be added within the query hierarchy.
542542

543543
:::tip
544544

@@ -550,7 +550,7 @@ To completely [prevent the addition of new rules](../tips/limit-groups), pass `c
550550

551551
`<RG extends RuleGroupTypeAny>(ruleGroup: RG, parentPath: number[], query: RG) => RG | false`
552552

553-
This callback is invoked before a new group is added. The function should either manipulate the group and return it as an object of the same type (either `RuleGroupType` or `RuleGroupTypeIC`), or return `false` to cancel the addition of the group. You can use `findPath(parentPath, query)` to locate the parent group to which the new group will be added within the query hierarchy.
553+
This callback is invoked before a new group is added. The function should either manipulate the group and return it as an object of the same type (either `RuleGroupType` or `RuleGroupTypeIC`), or return `false` to cancel the addition of the group. You can use [`findPath`](./misc#findpath) to locate the parent group to which the new group will be added within the query hierarchy.
554554

555555
:::tip
556556

0 commit comments

Comments
 (0)