material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Detail Panel Expand Icon

Open cmontois opened this issue 6 years ago • 5 comments

Describe the solution you'd like I just want to open a detailPanel in one specific column of the table, and so I want to be able to hide the "expand detail panel icon".

image

Describe alternatives you've considered I have managed to trigger the detailPanelToggle function from the Chip (the green Chip with value 39). But i can't figure out how to hide the icon ^^

Thanks !

cmontois avatar May 28 '20 08:05 cmontois

So you want to hide the green icon?

matthewoestreich avatar May 29 '20 00:05 matthewoestreich

Or do you want to hide the arrow to the left? If that is true, you can override the icons via a prop and just pass null as the appropriate toggle icon. See the readme for details.

Domino987 avatar May 29 '20 06:05 Domino987

@Domino987 thanks I didn't notice we could pass null my bad sorry for the issue ^^

cmontois avatar May 29 '20 07:05 cmontois

@cmontois Hi...i have problems triggering the detailPanelToggle function from onClick() action...Could you tell me how you succeeded ?

cristiangabor avatar Jun 24 '20 21:06 cristiangabor

I've created a custom package that hides the detailPanel column because I couldn't wait for it to be implemented, if you wanna test it, here's the link: https://github.com/Gr8tDaNe/material-table Once installed you can just use options.renderDetailPanelColumn: false to hide it (remember to implement a rowclick or another way to open it).

I'm a noob so this is probably not the ideal way of publishing a package, but I was short on time. I'll submit a pull request later today.

Set detailPanelColumnAlignment: "right", as well or the table won't render properly. I'll look into why that is when I have time.

Gr8tDaNe avatar Sep 11 '20 20:09 Gr8tDaNe