Code Monkey home page Code Monkey logo

Comments (4)

romgrk avatar romgrk commented on June 24, 2024

Have you considered adding an overlay outside of the grid? It would be the easiest way to solve your issue.

You could also fork the custom overlay example to show an error message conditionally, if applicable.

from mui-x.

john1625b avatar john1625b commented on June 24, 2024

Have you considered adding an overlay outside of the grid?

As in doing something like this!error ? <DataGrid.../> : <div> Error! </div>

that could work but it would be more convenient to just pass a prop. It would also make it easier to enforce an opininated way to handle errors with DataGrid to the rest of my coworkers.

from mui-x.

romgrk avatar romgrk commented on June 24, 2024

I don't think we would add a new prop for that purpose, you can already create a customized message overlay.

I think this is what you want: https://codesandbox.io/s/gifted-rui-c78zmf?file=/Demo.js

from mui-x.

john1625b avatar john1625b commented on June 24, 2024

@romgrk That's a good solution. Thanks.

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.