Code Monkey home page Code Monkey logo

Comments (5)

flaviendelangle avatar flaviendelangle commented on September 22, 2024 1

No problem, we'll keep this issue open to find a proper fix 👍

from mui-x.

flaviendelangle avatar flaviendelangle commented on September 22, 2024

Interesting... that's probably a bug.
But you can easily solve it by always passing the getTreeDataPath, it will just be ignored when treeData === false.

And by the way, you should always memoize getTreeDataPath to avoid re-generating the tree on every render.

from mui-x.

Ol-Boiko avatar Ol-Boiko commented on September 22, 2024

Hi flaviendelangle! Thanks for replying! Yeah, agree about memoizing but it was just for simplifying code for an example. I have my getTreeDataPath outside the component.
If it is a bug, I hope this will be fixed soon. We need this functionality so much.
For now if I switch from Tree Data to simple Grid I'm hiding Group column and disable it in manage column menu, creating fake path for rows, but it takes much efforts for development and automation teams to support all this logic since functionality of Data Grid is overcomplicated and without it

from mui-x.

flaviendelangle avatar flaviendelangle commented on September 22, 2024

Is there something preventing you from just always passing getTreeDataPath to your grid?

from mui-x.

Ol-Boiko avatar Ol-Boiko commented on September 22, 2024

Previously I received an error when I tried to do in the project. But I used your suggestion and look at it in the different perspective. I cleaned up all the rows while clicking before changing treeData to true and then generated new rows with path and it worked! no Group column in grid and no error!!! https://codesandbox.io/s/data-grid-community-forked-vyktlt?file=/src/App.tsx
Thanks a lot!

from mui-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.