-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Remove props to implement subrows #1853
Conversation
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.
Looks great overall
<DataGrid<Row, 'id'> | ||
enableCellSelect | ||
columns={columns} | ||
rowGetter={i => rows[i]} |
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.
It doesn't matter too much for demos, but we should avoid passing new functions on each render to DataGrid.
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 am thinking of using eventBus
more aggressively and avoid passing callbacks down. I have a few ideas that we can discuss next week
getSubRowDetails
onCellExpand
onDeleteSubRow
onAddSubRow
- this prop was not usedTreeView
example and implement subrows without the above props. SubRows implementation felt too complicated and I ended up using a simpler modelTreeView
andTreeViewNoDelete
examplesCellActions
exampleNext step is to replace
defaultCellContentRenderer
withdefaultFormatter