Skip to content

Commit

Permalink
Improve doc wording
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Oct 10, 2024
1 parent b715606 commit e7d88d4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/data/tree-view/rich-tree-view/selection/selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ type TreeViewSelectionPropagation = {
};
```

When `selectionPropagation.descendants` is set to `true`.
When `rowSelectionPropagation.descendants` is set to `true`.

- Selecting a parent will auto-select all its descendants.
- Deselecting a parent will auto-deselect all its descendants.
- Selecting a parent selects all its filtered descendants automatically.
- Deselecting a parent row deselects all its filtered descendants automatically.

When `selectionPropagation.parents` is set to `true`.
When `rowSelectionPropagation.parents` is set to `true`.

- Selecting all descendants of a parent will auto-select it.
- Deselecting a descendant of a selected parent will deselect the parent.
- Selecting all the filtered descendants of a parent selects the parent automatically.
- Deselecting a descendant of a selected parent deselects the parent automatically.

The example below demonstrates the usage of the `selectionPropagation` prop.

Expand Down
2 changes: 1 addition & 1 deletion docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ export interface UseTreeViewSelectionParameters<Multiple extends boolean | undef
*/
checkboxSelection?: boolean;
/**
* When `selectionPropagation.descendants` is set to `true`.
* - Selecting a parent will auto-select all its descendants.
* - Deselecting a parent will auto-deselect all its descendants.
* When `rowSelectionPropagation.descendants` is set to `true`.
*
* When `selectionPropagation.parents` is set to `true`.
* - Selecting all descendants of a parent will auto-select it.
* - Deselecting a descendant of a selected parent will deselect the parent.
* - Selecting a parent selects all its filtered descendants automatically.
* - Deselecting a parent row deselects all its filtered descendants automatically.
*
* When `rowSelectionPropagation.parents` is set to `true`.
*
* - Selecting all the filtered descendants of a parent selects the parent automatically.
* - Deselecting a descendant of a selected parent deselects the parent automatically.
*
* Only works when `multiSelect` is `true`.
* On the SimpleTreeView, only the expanded items are considered (since the collapsed item are not passed to the Tree View component at all)
Expand Down

0 comments on commit e7d88d4

Please sign in to comment.