-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[RFR] Added isRowExpandable prop to Datagrid component #5941
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.
Thanks! I think you forgot to update the computeNbColumns
function. Adding a test would be nice :)
Please ignore the previous comment except for the test. |
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.
We're removing props injection little by little, and replace them with contexts. I think this is a good occasion to introduce a DatagridContext, which will contain only the isRowExpandable function for a start. That way, you don't need to update the underlying components to sanitize the prop.
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 good so far!
packages/ra-ui-materialui/src/list/datagrid/useDatagridContext.ts
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/list/datagrid/DatagridRow.spec.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/list/datagrid/useDatagridContext.ts
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/list/datagrid/useDatagridContext.ts
Outdated
Show resolved
Hide resolved
…o DatagridBody component
Co-authored-by: Francois Zaninotto <francois@marmelab.com>
7b40601
to
1837d95
Compare
packages/ra-ui-materialui/src/list/datagrid/DatagridRow.spec.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/list/datagrid/useDatagridContext.ts
Outdated
Show resolved
Hide resolved
Thanks! |
Implements #5888