mui / toolpad

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

Issues with Google sheets datasource #505

Closed prakhargupta1 closed 2 years ago

prakhargupta1 commented 2 years ago

Duplicates

Latest version

Current behavior 😯

  1. When I configure Google sheets data, it says Screenshot 2022-05-31 at 12 21 49 PM

Rather it should say 'Interpret first row as headers'.

  1. I checked/unchecked the above option and was expecting it to reflect on datagrid. But it seems that it doesn't automatically recalculate the columns. You need to delete the existing columns and then the Datagrid refreshes. Expected behavior: It should refresh automatically.

App: https://master--toolpad.mui.com/_toolpad/app/cl1on1bd80041a1pdrrfdt0rq/editor/pages/cl3srtf4200003f6e1j50j390

Janpot commented 2 years ago
  1. I'll rename the option to "First row contains headers"
  2. This is tricky. Let me explain why you may not want this behavior. Suppose you've configured and tweaked the formatting/order/visibility/... of the columns of your data grid manually. Now you're tweaking the underlying datasource. What if you accidentally make a mistake? Would you want the data grid to wipe out all configuration you've made and put a new one? I'm of the opinion that Toolpad should never automatically overwrite options that the user has set. I'm opening https://github.com/mui/mui-toolpad/issues/513 which has been floating around as a solution to this problem.