-
-
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
Is there a way to toggle the detail panel from within a menu instead of on cell click? #7115
Comments
Hey @pjwise-korio
Here's a working demo: https://codesandbox.io/s/focused-kare-3gyd7l?file=/demo.tsx Let me know if this is sufficient for your use case. |
@cherniavskii Thank you very much for the codepen. Reviewing it now! |
@cherniavskii This works much better than the way I originally had this set up. Thank you very much! I did have one question that came up during set up - what is the difference between GridColumns and GridColDef? |
I'll open a discussion to make this less confusing in v6. I believe we can eliminate the need of using |
@pjwise-korio I've created this RFC #7188. Feel free to comment if you want to share your opinion on this :) |
I'm closing this issue, since it's resolved |
Order ID 💳
50140
Duplicates
Latest version
The problem in depth 🔍
Looking for the best way to toggle master detail panel within a menu instead of immediately after cell click.
I'm currently using GRID_DETAIL_PANEL_TOGGLE_FIELD in my column definitions like so
{ field: GRID_DETAIL_PANEL_TOGGLE_FIELD, flex: 1, headerName: 'Details', sortable: false, align: 'right', headerAlign: 'right', renderCell: (params: GridRenderCellParams) => { return ( <> <IconButton aria-label='expand row' size='small' onClick={handleClickListItem} id='user_options'> <MoreVertIcon /> </IconButton> <Menu id='user-more-menu' anchorEl={anchorEl} open={open} onClose={handleClose} MenuListProps={{ 'aria-labelledby': 'lock-button', role: 'listbox', }} > {options.map((option: any, index: any) => ( <MenuItem key={option} value={option} id={
option-${index}} // selected={index === selectedIndex} onClick={(event: any) => handleMenuItemClick(option, event, index, rows._id)} > {option} </MenuItem> ))} </Menu> </> ); }, }
is there a way to toggle the expansion of the detail panel on "View User Profile" click instead?
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: