mui / mui-toolpad

Toolpad Studio: Low-code admin builder. Open-source and powered by MUI.
https://mui.com/toolpad/
MIT License
805 stars 201 forks source link

[studio] Cell shouldn't be editable by default #3524

Open oliviertassinari opened 1 week ago

oliviertassinari commented 1 week ago

Steps to reproduce

  1. Open https://tools-public.mui.com/prod/pages/baseUiNpmKpis
  2. 🙃

https://github.com/mui/mui-toolpad/assets/3165635/fcccf85c-6035-40d3-a2ad-6401ca0a900e

Context

I suspect https://github.com/mui/mui-toolpad/pull/3001 is the origin of this regression. I noticed this one on the same app that I noticed the other regressions from (the Zendesk plugin), while I was fixing https://github.com/mui/mui-private/pull/470.

Benchmarks

SCR-20240505-qafn
b4s36t4 commented 1 week ago

Hi, @oliviertassinari. Would love to take up this issue, but I'm stuck at understanding the issue.

This is what I did understand, please let me know if it's not the case, and in case the it's same is it possible for me take up this one?

Janpot commented 1 week ago

@b4s36t4 The data grid should only be editable when it is linked to a data provider that supports editing rows. In all other cases there won't be any logic available to handle the row updates, so having the grid editable makes no sense.

As you may notice in the live example, you can change the value of the cel, but as soon as you exit editing mode, the value is reset again. This is meant to be a static grid, output only.

b4s36t4 commented 1 week ago

@Janpot I have raised a PR, please check it.!