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

Cannot read property 'label' of undefined - template is undefined #37

Open
joni7777 opened this issue Mar 27, 2017 · 2 comments
Open

Cannot read property 'label' of undefined - template is undefined #37

joni7777 opened this issue Mar 27, 2017 · 2 comments

Comments

@joni7777
Copy link

After following the instructions in the README (setting up ThemeProvider), this throws the exception (

Cannot read property 'label' of undefined

):

import React from 'react';
import ThemeProvider from 'react-toolbox/lib/ThemeProvider';
import {Input} from 'react-toolbox/lib/input/Input';

import  '../../../public/react-toolbox/theme.css'

import theme from '../../../public/react-toolbox/theme'

export default class Grow extends React.Component {
	render() {
		return <ThemeProvider theme={theme}>
			<div className="grow-container">
				<Input className="grow-input" type='text' label='Contacts' name='name'/>
			</div>
		</ThemeProvider>
	}
}

and this doesnt throw the expection but no style:

import React from 'react';
import ThemeProvider from 'react-toolbox/lib/ThemeProvider';
import {Input} from 'react-toolbox/lib/input/Input';

import  '../../../public/react-toolbox/theme.css'

import theme from '../../../public/react-toolbox/theme'

export default class Grow extends React.Component {
	render() {
		return <ThemeProvider theme={theme}>
			<div className="grow-container">
				<Input theme={theme} className="grow-input" type='text' label='Contacts' name='name'/>
			</div>
		</ThemeProvider>
	}
}

package.json:

{
  "name": "react-grow",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "lodash": "^4.17.4",
    "open-sans-fontface": "^1.4.0",
    "react": "^15.4.2",
    "react-dom": "^15.4.2",
    "react-number-format": "^1.1.2",
    "react-router-dom": "^4.0.0",
    "react-tap-event-plugin": "^2.0.1"
  },
  "devDependencies": {
    "react-scripts": "0.9.5",
    "react-toolbox": "2.0.0-beta.6",
    "react-toolbox-themr": "^1.0.2"
  },
  "reactToolbox": {
    "include": [
      "AUTOCOMPLETE",
      "AVATAR",
      "BUTTON",
      "CARD",
      "CHECKBOX",
      "CHIP",
      "DATE_PICKER",
      "DIALOG",
      "DRAWER",
      "DROPDOWN",
      "INPUT",
      "LAYOUT",
      "LINK",
      "LIST",
      "MENU",
      "NAVIGATION",
      "OVERLAY",
      "PROGRESS_BAR",
      "RADIO",
      "RIPPLE",
      "SLIDER",
      "SNACKBAR",
      "SWITCH",
      "TABLE",
      "TABS",
      "TIME_PICKER",
      "TOOLTIP"
    ],
    "output": "public/react-toolbox"
  },
  "scripts": {
    "start": "npm run toolbox && react-scripts start",
    "build": "npm run toolbox && react-scripts build",
    "toolbox": "react-toolbox-themr"
  },
  "eslintConfig": {
    "extends": "react-app"
  }
}

anyone have any idea why?

@burtontanner
Copy link

I have the same problem

@ejames17
Copy link

ejames17 commented Jan 5, 2019

any progress on this? I have the same problem

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

No branches or pull requests

3 participants