mui-toolpad icon indicating copy to clipboard operation
mui-toolpad copied to clipboard

[studio] Cell shouldn't be editable by default

Open oliviertassinari opened this issue 9 months ago • 3 comments

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

  • Retool does this right:
SCR-20240505-qafn

oliviertassinari avatar May 05 '24 16:05 oliviertassinari

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

  • Currently by default all cells are editable, which shouldn't be the case.
  • We should let the user choose which column should be editable in the properties panel.

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?

b4s36t4 avatar May 05 '24 16:05 b4s36t4

@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.

Janpot avatar May 06 '24 08:05 Janpot

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

b4s36t4 avatar May 06 '24 10:05 b4s36t4