-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Migrate Selection pages #248
[docs] Migrate Selection pages #248
Conversation
decbd26
to
2572b9f
Compare
2572b9f
to
43fac04
Compare
docs/src/pages/components/data-grid/selection/ControlledSelectionGrid.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Matt <github@nospam.33m.co>
- `onSortModelChange`: Callback fired when the columns sorting changed before the grid has sorted its rows. | ||
- `getSortModel`: Get the sort model currently applied to the grid. | ||
- `setSortModel`: Set the sort model and trigger the sorting of rows. | ||
- `onSortModelChange`: Callback fired when the column sorting changed before the grid has sorted its rows. |
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.
"before the grid has sorted its rows"
Is this referring to row sort order, or column sort order within rows?
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.
What's the difference?
I think that we should remove the reference to this. There is one state, it controls how the header communicate to the users the sort order and how the rows are sorted. This state is displayed to the user in a best effort way. Sorting the rows can take a bit of time.
- `onSortModelChange`: Callback fired when the column sorting changed before the grid has sorted its rows. | |
- `onSortModelChange`: Callback fired when the column sorting changes. |
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.
What's the difference?
One is rows, the other is columns, so quite a significant difference!
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'm confused, both should always be in the same state (more or less the time it takes to propagate, raf, xhr, etc), no?
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.
The description is ambiguous, but if the prop is being removed, it doesn't matter.
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 don't think that we should remove this apiRef, it's equivalent to the prop, that are required for controlling the "sort by" state.
* @param param With all properties from [[RowParams]]. | ||
*/ | ||
onRowHover?: (param: RowParams) => void; | ||
/** | ||
* Callback fired when one row get selected. | ||
* Callback fired when one row is selected. |
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.
One, and only one row?
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 propose we remove this prop in #247
One more page https://deploy-preview-248--material-ui-x.netlify.app/components/data-grid/selection/