mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.05k stars 1.25k forks source link

[data grid] Export GridRowReorderCell to help with customization #14113

Open genepaul opened 1 month ago

genepaul commented 1 month ago

Latest version

Summary

I submitted #14079 to export the GridRowReorderCell, but I'm not sure if that's the right way to do it and i'm getting errors. What I'm trying to accomplish is having something available to me similar to the GridCellCheckboxRenderer, or one of the other renderers like that so I can modify the renderCell of the GRID_REORDER_COL_DEF and include custom content.

Examples

I have a custom cell put together that works, but I have to reach into the data-grid exports to do it:

https://codesandbox.io/s/gracious-wave-srhd89?file=/src/Demo.tsx

Motivation

I have a requirement to show the row's priority in the reorder cell, and it seemed like the only way to do this was to modify the renderer of the reorder column. If there's a better way to do this, I'd be happy to hear it.

Search keywords: rowReordering custom cell Order ID: 0332927583

michelengelen commented 1 month ago

Hey @genepaul ... I'll add this to the board. 👍🏼