Skip to content

[data grid][tree view] Support different data structure #17197

Open
@oliviertassinari

Description

@oliviertassinari

Summary

The data grid data structure for trees is https://mui.com/x/react-data-grid/tree-data/

const rows: GridRowsProp = [
  { path: ['Sarah'], jobTitle: 'CEO', id: 0 },
  { path: ['Sarah', 'Thomas'], jobTitle: 'Head of Sales', id: 1 },
  { path: ['Sarah', 'Thomas', 'Robert'], jobTitle: 'Sales Person', id: 2 },
  { path: ['Sarah', 'Thomas', 'Karen'], jobTitle: 'Sales Person', id: 3 },
]; 

It's different from the data structure for tree view https://mui.com/x/react-tree-view/rich-tree-view/items/.

const MUI_X_PRODUCTS: TreeViewBaseItem[] = [
  {
    id: 'grid',
    label: 'Data Grid',
    children: [
      { id: 'grid-community', label: '@mui/x-data-grid' },
      { id: 'grid-pro', label: '@mui/x-data-grid-pro' },
      { id: 'grid-premium', label: '@mui/x-data-grid-premium' },
    ],
  },

In both cases, the data is likely stored in a relational database, so I wonder about the value of supporting both structures for both components.

I'm opening this issue to see if people from the community have thoughts around it.

Examples

No response

Motivation

No response

Search keywords: -

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionfeature: Tree dataRelated to the data grid Tree data featurescope: data gridChanges or issues related to the data grid productscope: tree viewChanges or issues related to the tree view productstatus: waiting for upvotesThis request is open for community feedback and needs more interest to be considered.type: new featureIntroduces a new piece of functionality or capability.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions