Home > Back-end >  Is there a column type for "select" in DataGrid from MUI?
Is there a column type for "select" in DataGrid from MUI?

Time:10-13

I'm starting to enable editing on my code and what if I wanna use a select so the user go through options and select those (it's important to have the exact same string for other coding purposes and I don't want the user to mess it up which is why I want a select option) instead of typing?

According to Cell editing I have seen examples with custom options and the classic type options: number, date, datetime but I didn't saw one with a select example I tried using type: "select" clearly didn't work. Any documentation/help/tip helps.

CodePudding user response:

Yes, there is a column type called singleSelect. You can see all of the column types here:

{
  field: "country",
  editable: true,
  type: "singleSelect",
  valueOptions: ["United Kingdom", "Spain", "Brazil"]
}
  • Related