Giter VIP home page Giter VIP logo

Comments (4)

fzaninotto avatar fzaninotto commented on April 28, 2024

The migration documentation you're referring to (https://marmelab.com/react-admin/Upgrade.html#simpleform-and-tabbedform-no-longer-accept-margin-and-variant) explains that you can apply custom props on the MuiTextField. This works. Can you confirm it?

We probably need to remove the mention of overriding RaTextInput default props as it's not working. Marking this as a documentation issue.

from react-admin.

wattry avatar wattry commented on April 28, 2024

I'll be specific to the component we're attempting to override. RA Button

const {
        alignIcon = 'left',
        children,
        className,
        disabled,
        label,
        color = 'primary',
        size = 'small',
        to: locationDescriptor,
        ...rest
    } = props;

Since the props are being provided as overrides here MUI does not use the defaultProps defined in the theme. You can see this working for color on the columns button, as it does not set a default color, however the rest of the toolbar does. So the color override works and the size does not.

Stackblitz example can be found in the index

from react-admin.

fzaninotto avatar fzaninotto commented on April 28, 2024

@wattry concerning the ability to override react-admin components, it's not possible without a breaking change (cf #9546). We're preparing v5, so it's the right time to work on that. I suggest you open a new issue about it.

from react-admin.

wattry avatar wattry commented on April 28, 2024

@fzaninotto we were more interested in if we were misinterpreting the documentation or if that component wasn't implemented to use RA overrides. We've managed thus far and since it's in RA5 is on the horizon, I'm not going to request your teams resources to update this.

from react-admin.

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.