Code Monkey home page Code Monkey logo

Comments (6)

romgrk avatar romgrk commented on September 26, 2024

You should find what you need in the following links:

https://mui.com/x/react-data-grid/row-height/#variable-row-height

https://codesandbox.io/s/agitated-surf-rghlwv?file=/Demo.js

Does that answer your question?

from mui-x.

nessj1994 avatar nessj1994 commented on September 26, 2024

This does indeed fix that, but it also causes other issues. Any way to set this without it causing overflow of columns that were previously working?
image

With it enabled I get this issue where my part descriptions overflow into my quantity column. Without this setting it was fine and would truncate at the end of the column as expected.

from mui-x.

romgrk avatar romgrk commented on September 26, 2024

Please provide a minimal reproduction test case with the latest version. This would help a lot 👷.
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

from mui-x.

nessj1994 avatar nessj1994 commented on September 26, 2024

Working on that recreation. Trying to simplify things as much as possible because our table is pretty heavy on custom cellRenderers and feature implementations. I'll probably have a link to it bright and early tomorrow.

Edit: Still working on this. Can't seem to get it to replicate just yet. Trying to find what settings in mine are different without fully recreating my whole setup.

from mui-x.

nessj1994 avatar nessj1994 commented on September 26, 2024

I actually figured it out. I can post the example if you'd like or you can just close it. In my custom cell renderer there was an overlap with some old tailwind css code that I accidentally left in that was causing it to not wrap properly.

In case anyone ever needs it for their own diagnosis, or just so you guys have it here's the problematic code and also the link to my sandbox setup


const PartCell = (params): JSX.Element => {
  return (
    <Stack>
      <Typography
        variant="subtitle1"
        fontWeight={"bold"}
        textTransform="uppercase"
        noWrap={false}
        sx={{ textDecoration: !params.row?.enabled ? "line-through" : "" }}
      >
        {params.row.part_num}
      </Typography>

      <Typography
        fontWeight="light"
        title={params.row?.part_description}
        className="truncate text-ellipsis" <- this line here
        variant="body2"
      >
        {params.row?.part_description}
      </Typography>
    </Stack>
  );
};

Sandbox: https://codesandbox.io/s/frosty-saha-rpqhlq

Thank you for your help along the way.

from mui-x.

romgrk avatar romgrk commented on September 26, 2024

👍

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.