Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying ThemeDecorator on a ES6 component eats my props #1803

Closed
tjunnone opened this issue Oct 5, 2015 · 3 comments
Closed

Applying ThemeDecorator on a ES6 component eats my props #1803

tjunnone opened this issue Oct 5, 2015 · 3 comments
Labels
customization: theme Centered around the theming features

Comments

@tjunnone
Copy link
Contributor

tjunnone commented Oct 5, 2015

ThemeDecorator appears to swallow all custom properties set on a component.

Example:

@ThemeDecorator(ThemeManager.getMuiTheme(MyTheme))
class MyComponent extends React.Component {
    constructor(props) {
        console.log("Props:", props);
        super(props);
    }
}

Usage:

    <MyComponent myProp="foo"/>

Expected log output is "Props: Object {myProp: "foo"}", but when applying the ThemeDecorator to the component the output becomes simply "Props: Object {}".

@bdefore
Copy link

bdefore commented Oct 6, 2015

i've just encountered this as well

@shaurya947
Copy link
Contributor

@tjunnone @bdefore can you please verify that #1841 fixes this issue? I will go ahead and merge it then.

@bdefore
Copy link

bdefore commented Oct 8, 2015

@shaurya947 i monkey patched my node_modules/material-ui#react-0.14-support theme-decorator.js and it does fix the issue. thanks!

@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added customization: theme Centered around the theming features and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features
Projects
None yet
Development

No branches or pull requests

5 participants