Code Monkey home page Code Monkey logo

Comments (7)

michelengelen avatar michelengelen commented on August 17, 2024 1

Hey @Jaryt and thanks for using the datagrid!

Could you provide us with a live example of your problem? It seems like the mentioned rendering delays are not prevelant on our demo (and on my local instance) as you are experiencing them. Maybe this is related to the version being 5.17 (we did quite a lot of improvements lately).

Thanks again! 🙇🏼

P.s., We're using DataGrid Premium heavily in our web app, in a lot of different use cases. I would love to arrange a chat with someone from your dev team to show how we're using it, and possibly get tips on what we could be doing better. :)

@cherniavskii would you be up for a chat on this?

from mui-x.

Jaryt avatar Jaryt commented on August 17, 2024 1

Actually, I'll keep it open for now, but feel free to close if you feel it's needed

from mui-x.

Jaryt avatar Jaryt commented on August 17, 2024

Hey @Jaryt and thanks for using the datagrid!

Could you provide us with a live example of your problem? It seems like the mentioned rendering delays are not prevelant on our demo (and on my local instance) as you are experiencing them. Maybe this is related to the version being 5.17 (we did quite a lot of improvements lately).

Thanks again! 🙇🏼

P.s., We're using DataGrid Premium heavily in our web app, in a lot of different use cases. I would love to arrange a chat with someone from your dev team to show how we're using it, and possibly get tips on what we could be doing better. :)

@cherniavskii would you be up for a chat on this?

Yeah, I believe you might be right about it being due to the version. We've tried migrating over but hit some issues with the flexing of the grid changing, which required a lot of restructuring of the parent components. I'll be trying to migrate again when possible.

The key point here is probably about the aggegationRowPosition not being reevaluated when the expansion of the row changes. I think that would be helpful so that we don't have to manually handle the re-rendering there.

from mui-x.

michelengelen avatar michelengelen commented on August 17, 2024

Yeah, I believe you might be right about it being due to the version. We've tried migrating over but hit some issues with the flexing of the grid changing, which required a lot of restructuring of the parent components. I'll be trying to migrate again when possible.

If you need help migrating please feel free to reach out. 💪🏼

The key point here is probably about the aggegationRowPosition not being reevaluated when the expansion of the row changes. I think that would be helpful so that we don't have to manually handle the re-rendering there.

We can definitely take a look at that. @cherniavskii should we put this on board for us, so we don't forget about it?

from mui-x.

cherniavskii avatar cherniavskii commented on August 17, 2024

Hi @Jaryt
Sorry for the late reply, I missed the notification on this issue in my notifications.

The workaround for the dynamic getAggregationPosition could be as simple as this:

const apiRef = useGridApiRef();

// workaround to get the grid to re-render when the expanded rows change
const [_, rerender] = React.useState(0);
React.useEffect(() => {
  return apiRef.current.subscribeEvent('rowExpansionChange', () => {
    rerender((prev) => prev + 1);
  });
}, [apiRef]);

Here's a working demo: https://stackblitz.com/edit/react-rpklny-afqhbq?file=Demo.tsx

I think it's a decent workaround for the time being.
Changing the current behavior would require a non-trivial refactor.
I'm adding a "waiting for upvotes" label to see the demand for this in the community 🙂

from mui-x.

Jaryt avatar Jaryt commented on August 17, 2024

@cherniavskii No worries, I understand things are busy in the OSS land.

Interesting solution here, I'll give it a shot!

Thank you 👍

from mui-x.

github-actions avatar github-actions commented on August 17, 2024

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@Jaryt: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

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.