mui / toolpad

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

[Typography] Buggy default value #755

Closed oliviertassinari closed 2 years ago

oliviertassinari commented 2 years ago

Duplicates

Latest version

Current behavior 😯

What's displayed should match with the props

Expected behavior 🤔

It doesn't match.

Steps to reproduce 🕹

Steps:

  1. Open https://master--toolpad.mui.com/_toolpad/app/cl1c2j0l512939zo6a43575en/editor/pages/cl6i6tvxa00003b6gb6jit295
  2. See how there is "Text" displayed but nothing under the "value" property.
Screenshot 2022-08-06 at 19 49 02

Context 🔦

I first tried to click on the "Text"

Screenshot 2022-08-06 at 19 47 47

area to type my text. When I realized that it would not work, I searched for where "Text" was displayed. And because I couldn't find it, I started to try the different prop to see which one would update the content of the Typography.

Janpot commented 2 years ago

I think this is a regression, and probably the same root cause as https://github.com/mui/mui-toolpad/issues/753

This is the offending line: https://github.com/mui/mui-toolpad/blob/8df09f1537faf9f4b698e033e33f90987cb3cca7/packages/toolpad-app/src/runtime/ToolpadApp.tsx#L445 overwriting the defaults with undefined. Introduced in https://github.com/mui/mui-toolpad/pull/696. Working on a fix.