Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more data types in data grid #827

Closed
2 tasks done
prakhargupta1 opened this issue Aug 19, 2022 · 11 comments · Fixed by #1223
Closed
2 tasks done

Support more data types in data grid #827

prakhargupta1 opened this issue Aug 19, 2022 · 11 comments · Fixed by #1223
Assignees
Labels
new feature New feature or request scope: toolpad-studio Abbreviated to "studio"

Comments

@prakhargupta1
Copy link
Member

prakhargupta1 commented Aug 19, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Our data grid (in Toolpad) currently supports 5 data types namely:

  1. Boolean
  2. Date
  3. Date time
  4. String
  5. Number

But Retool supports 20 data types, Appsmith supports 9.

We could add:

Examples 🌈

  • created_at column here is being read properly in Retool but not in Toolpad
@prakhargupta1 prakhargupta1 added the new feature New feature or request label Aug 19, 2022
@prakhargupta1 prakhargupta1 changed the title Support more data types in datagrid More data types in data grid should be supported Aug 19, 2022
@Janpot

This comment was marked as resolved.

@prakhargupta1
Copy link
Member Author

There are fields like action button, URL, image, video, but we can look into it when the need comes.

@prakhargupta1
Copy link
Member Author

prakhargupta1 commented Oct 18, 2022

I am including it in the next sprint. We can start with link, image column types.

@oliviertassinari oliviertassinari changed the title More data types in data grid should be supported Support more data types in data grid Oct 19, 2022
@apedroferreira apedroferreira self-assigned this Oct 25, 2022
@apedroferreira
Copy link
Member

@prakhargupta1 I understand that these columns types are not natively supported by the MUI X Data Grid, correct?

So if we implement these new column types they will be something that Toolpad is adding on top of the MUI X Data Grid, not a feature of the data grid itself.
Just clarifying that as I'm not sure if there would be any interest for the MUI X team in adding these column types natively to the data grid.

@prakhargupta1
Copy link
Member Author

Found the same info here: https://mui.com/x/react-data-grid/column-definition/#column-types

@joserodolfofreitas This issue is about supporting more column types like link, image and even a custom component in the data grid. Aren't these natively supported?

@apedroferreira
Copy link
Member

Just to clarify: I can add all these column types to the grid on Toolpad if they're something we want, it shouldn't be that hard.
The "custom component" column type for example will be something unique to Toolpad, obviously.
As for link and image, I'm just noting that they could be features that the Datagrid already has, but if the MUI X team has no plans to add them I can just create them in Toolpad.

@joserodolfofreitas
Copy link
Member

This issue is about supporting more column types like link, image and even a custom component in the data grid. Aren't these natively supported?

We don't support those out-of-the-box, but you can create customizations.

Generally speaking, a link, image or something alike would usually only have a different render, but would most likely operate as strings internally.
In the Data Grid, being a column type has several implications, like how it behaves on filtering, sorting, editing or aggregation, for instance.

@joserodolfofreitas
Copy link
Member

I think this level of abstraction makes sense on toolpad, but I'm not so sure in the Data Grid because of the implications I mentioned above, but I'm curious to see how this custom columns get implemented.
Perhaps it'd make sense somehow to incorporate into the Data Grid later (even if it's as "recipes" on the docs).

@Janpot
Copy link
Member

Janpot commented Oct 26, 2022

@apedroferreira fyi, we already have some customizations: https://github.com/mui/mui-toolpad/blob/920d5fb439cd5512d0414c65c27ee6016868b9f4/packages/toolpad-components/src/DataGrid.tsx#L134

@apedroferreira
Copy link
Member

Sounds good, will add on Toolpad. Just making sure!

@Janpot
Copy link
Member

Janpot commented Dec 14, 2022

I'm adding number formatting in #1449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request scope: toolpad-studio Abbreviated to "studio"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants