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

Uncaught TypeError: Cannot read property 'baseTheme' of undefined #54

Open
paliwalgaurav opened this issue Aug 9, 2017 · 7 comments
Open

Comments

@paliwalgaurav
Copy link

@hyojin I have some issues when I am using it with v1 package.

Uncaught TypeError: Cannot read property 'baseTheme' of undefined at getStyles (DataTables.js:96) at DataTables.render (DataTables.js:298) at react-dom.js:5257 at measureLifeCyclePerf (react-dom.js:4537) at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (react-dom.js:5256) at ReactCompositeComponentWrapper._renderValidatedComponent (react-dom.js:5283) at ReactCompositeComponentWrapper.performInitialMount (react-dom.js:4823) at ReactCompositeComponentWrapper.mountComponent (react-dom.js:4719) at Object.mountComponent (react-dom.js:11551) at ReactCompositeComponentWrapper.performInitialMount (react-dom.js:4832)

even when I am using custom theme created.

I am using v1 beta 4

@kdipaolo
Copy link

kdipaolo commented Aug 21, 2017

@paliwalgaurav I was experiencing this same error. I wrapped the data tables component in the Material design MuiThemeProvider component like so to get the table working correctly:

import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'



      <MuiThemeProvider>
          <DataTables
            height={'auto'}
            ....
        />
        </MuiThemeProvider>

@paliwalgaurav
Copy link
Author

paliwalgaurav commented Aug 22, 2017

@kdipaolo I have already done this. Actually, the main container of the website is inside MuiThemeProvider tag.

@hyojin
Copy link
Owner

hyojin commented Aug 28, 2017

It looks like they've changed the way theme works on v1. I'll start investigation soon.

@eromoe
Copy link

eromoe commented Aug 28, 2017

Got Uncaught TypeError: Cannot read property 'baseTheme' of undefined too

version: ^0.18.2

I didn't use custom theme

@eromoe
Copy link

eromoe commented Aug 28, 2017

OK, I understand the v1 migration means

    "material-ui": "^1.0.0-beta.6",
    "material-ui-datatables": "^0.18.2",
    "material-ui-icons": "^1.0.0-beta.5",

@sugandhgoyal
Copy link

sugandhgoyal commented Dec 28, 2017

I am also getting the same error after wrapping the whole component in one MuiThemeProvider muiTheme={getMuiTheme()}

@andyweiss1982
Copy link

has anyone found a solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants