Skip to content

Commit 66ac87d

Browse files
committed
Add ability to specify disabled paths
1 parent a83ce8d commit 66ac87d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/api/querybuilder.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,11 @@ Pass `true` to display a drag handle to the left of each group header and rule.
654654

655655
### `disabled`
656656

657-
`boolean` (default `false`)
657+
`boolean | number[][]` (default `false`)
658658

659659
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#disabled=true)
660660

661-
Pass `true` to disable all subcomponents and prevent changes to the query.
661+
Pass `true` to disable all subcomponents and prevent changes to the query. Pass an array of paths to disable specific rules and/or groups, e.g. `disabled={[[0]]}` will disable the first rule and its subcomponents but nothing else.
662662

663663
### `validator`
664664

docs/typescript.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,6 @@ interface Schema {
161161
enableDragAndDrop: boolean;
162162
validationMap: ValidationMap;
163163
independentCombinators: boolean;
164+
disabledPaths: number[][];
164165
}
165166
```

0 commit comments

Comments
 (0)