mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
1.29k stars 285 forks source link

[code components] Support building components with adjustable height #3332

Open Janpot opened 7 months ago

Janpot commented 7 months ago

Summary

It should be possible for code components to be height adjustable, just like the built-in Chart/DataGrid. Perhaps the component definition could support a verticallyResizable property or something?

Examples

No response

Motivation

I'm trying to build a custom variant of the DataGrid, but I can't achieve feature parity to the built-in DataGrid because I can't make it vertically resizable

Search keywords: code component height

apedroferreira commented 7 months ago

I may not have realized by adding this change https://github.com/mui/mui-toolpad/blob/c93afe3859959c76baf442e17590b1a66ee2a537/packages/toolpad-studio/src/toolpad/AppEditor/PageEditor/RenderPanel/RenderOverlay.tsx#L1473 that I made it so that it's not possible to make a custom component vertically resizable...

An easy first step would be to replace this component whitelist with an opt-in prop, as you said - actually this list of components inside a component wasn't a great solution... Besides that we can definitely discuss this whole topic more deeply - I was working on improving vertical resizing but it still had some difficult bugs/issues and so it needs some more time/work dedicated to it.