Code Monkey home page Code Monkey logo

Comments (7)

DanailH avatar DanailH commented on July 22, 2024 1

I think @romgrk will have more context regarding this.

from mui-x.

michelengelen avatar michelengelen commented on July 22, 2024

Hey @RazbezhkinAV
The example you did provide us with is not working unfortunately.
Could you please fix it so we can see what exactly is not working?
Thanks! 🙇🏼

from mui-x.

RazbezhkinAV avatar RazbezhkinAV commented on July 22, 2024

@michelengelen
I'm sorry, everything should be working now.
https://codesandbox.io/p/sandbox/autosizing-mui-data-grid-hfrxgg?file=%2Fsrc%2FPopUpComponent.tsx%3A64%2C14

from mui-x.

michelengelen avatar michelengelen commented on July 22, 2024

Ok, now I can see what's not working.
@cherniavskii could you have a look at this?
The autosize on mount and on click is behaving differently and it does not expand all columns enough to view the values in their entirety!
Thanks! 🙇🏼

from mui-x.

romgrk avatar romgrk commented on July 22, 2024

Don't know why it's happening, I'll need to debug more in details to understand. It looks like it's very close to the required width, maybe the fractional widths are off by a tiny bit. All it takes is for the width to be stricly <, even by the tiniest amount, and the browser falls back to a text ellipsis. An easy fix could be to always add 1px to whatever width we have calculated.

from mui-x.

romgrk avatar romgrk commented on July 22, 2024

As for the issue with autosizeOnMount, also don't understand the difference for the last two columns.

Note: your columns are constant, you can extract them outside the component instead of memo'ing them.

from mui-x.

MiLandry avatar MiLandry commented on July 22, 2024

Any ETA on this fix? The slight buffer seems like that would work. I'd like to note that the calculation is easily thrown off when the cells have borders, or the showCellVerticalBorder prop is passed in.

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.