New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Improve Tree View selection doc #13105
Conversation
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Signed-off-by: Gene Arch <genepaularch@gmail.com> Co-authored-by: Rom Grk <romgrk.cc@gmail.com>
|
||
{{"demo": "MultiSelectTreeView.js"}} | ||
|
||
:::success |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the data grid, I added those as success
because IMHO this is more a side not than the main content here.
The main content is how to enable selection, and then we describe how to use selection but this mostly target end users which won't read to doc, so it's more to say "Hey we have good selection interactions".
@@ -54,3 +74,17 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen | |||
Use the `onItemSelectionToggle` prop if you want to react to an item selection change: | |||
|
|||
{{"demo": "TrackItemSelectionToggle.js"}} | |||
|
|||
## Parent / children selection relationship |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worth adding a demo here on how to do it in user-land?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth it, yes 馃憣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 馃憤
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super valuable improvement 馃憣 馃帀
@@ -54,3 +74,17 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen | |||
Use the `onItemSelectionToggle` prop if you want to react to an item selection change: | |||
|
|||
{{"demo": "TrackItemSelectionToggle.js"}} | |||
|
|||
## Parent / children selection relationship |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth it, yes 馃憣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a very nice improvement. 馃憦
Co-authored-by: Nora <72460825+noraleonte@users.noreply.github.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
2a5ef15
to
0e0444b
Compare
Doc applied to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement 馃帀
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Signed-off-by: Gene Arch <genepaularch@gmail.com> Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com> Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> Co-authored-by: Gene Arch <genepaularch@gmail.com> Co-authored-by: Rom Grk <romgrk.cc@gmail.com> Co-authored-by: Nora <72460825+noraleonte@users.noreply.github.com>
My first goal was to add a single selection demo, which was really lacking.
But I ended up doing a lot more changes on this page.
I'll replicate the changes on the
SimpleTreeView
doc once approved 馃憤I took the DataGrid doc as an inspiration, but IMHO it is not great (no link to the multi select keyboard shortcuts for instance).
SimpleTreeView