Giter Site home page Giter Site logo

Comments (3)

LukasTy avatar LukasTy commented on August 15, 2024 1

@giavinh79 Thank you for creating this issue! πŸ™
The problem stems from the fact that this particular slot supports two ways of passing props:

  • a callback
  • an object

In such case, to replicate/keep the existing behavior you need to use resolveComponentProps to avoid the TS errorβ€”and a problem if you'd use a callback in your example.
Please find the updated demo and let me know if you have any further questions regarding this. πŸ˜‰ πŸ‘

@flaviendelangle do you agree that we should improve the documentation in this regard? πŸ€”
The question is, would it make sense to extend https://mui.com/base-ui/guides/overriding-component-structure/ or create a separate page in X documentation?

from mui-x.

flaviendelangle avatar flaviendelangle commented on August 15, 2024 1

This relates a lot to https://mui-org.slack.com/archives/C04U3R2V9UK/p1714135691643129?thread_ts=1714088113.295129&cid=C04U3R2V9UK

base-ui is dropping the slots approach (but @mui/material will keep using it) so the guide might not survive for very long in its current form.

from mui-x.

LukasTy avatar LukasTy commented on August 15, 2024 1

Let this be the issue that we can use as a basis to improve the documentation.
I'm moving it to grooming. πŸ‘Œ

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.