-
-
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
[data grid] Not able to have headerName
for togglePanel
#12261
Comments
headerName
for togglePanel
headerName
for togglePanel
headerName
for togglePanel
Yes exactly @MBilalShafi |
headerName
for togglePanel
headerName
for togglePanel
@ajayaccuknox it is possible to render a custom header for the toggle column. You can use this section of the docs as a starting point: Customizing the detail panel toggle What you have to do is:
example: const columns: GridColDef[] = [
{
...GRID_DETAIL_PANEL_TOGGLE_COL_DEF,
renderHeader: () => <div>Details</div>,
},
{ field: 'id', headerName: 'Order ID' },
{ field: 'customer', headerName: 'Customer', width: 200 },
]; Just using Let me know if this answers your question. @MBilalShafi we could maybe add a recipe to show how that works. WDYT? |
@michelengelen Sure, that could be useful, or we could improve this similar recipe by adding a custom |
The issue has been inactive for 7 days and has been automatically closed. |
Related page
https://mui.com/x/react-data-grid/master-detail/
Kind of issue
Unclear explanations
Issue description
So I have a table in the table I need to show the master details under the each row so I have used toggleDetailPanel in that I made it successful but the issue is I couldn't able to have a separate column name like headerName
Context
So I have a table in the table I need to show the master details under the each row so I have used toggleDetailPanel in that I made it successful but the issue is I couldn't able to have a separate column name like headerName
Search keywords: headerName for togglePanel
The text was updated successfully, but these errors were encountered: