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

Error: Element type is invalid #46

Closed
ModPhoenix opened this issue Sep 19, 2018 · 3 comments
Closed

Error: Element type is invalid #46

ModPhoenix opened this issue Sep 19, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ModPhoenix
Copy link

Hi guys,

What am I doing wrong? I just add code like in the example, but I get an error.

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
  render() {
    return (
      <ClientModuleLayout
        title="Lots"
        footerLink={this.footerLink}
        menuList={this.menuList}
      >
        <MaterialTable
          columns={[
            {title: 'Adı', field: 'name'},
            {title: 'Soyadı', field: 'surname'},
            {title: 'Doğum Yılı', field: 'birthYear', type: 'numeric'},
            {title: 'Doğum Yeri', field: 'birthCity', lookup: {34: 'İstanbul', 63: 'Şanlıurfa'}}
          ]}
          data={[{name: 'Mehmet', surname: 'Baran', birthYear: 1987, birthCity: 63}]}
          title="Demo Title"
        />
      </ClientModuleLayout>
    );
  }
@mbrn mbrn self-assigned this Sep 19, 2018
@mbrn mbrn added the help wanted Extra attention is needed label Sep 19, 2018
@mbrn
Copy link
Owner

mbrn commented Sep 19, 2018

Hi @ModPhoenix ,

I will check it and return. It seems that something related with dependencies.

@mbrn mbrn added bug Something isn't working and removed help wanted Extra attention is needed labels Sep 19, 2018
@mbrn
Copy link
Owner

mbrn commented Sep 21, 2018

@ModPhoenix , Problem resolved. you can take latest version(0.6.5).

Code is too fresh:). If you find any other bugs please submit a issue.

@mbrn mbrn closed this as completed Sep 21, 2018
@wangxpert
Copy link

Is this bug fixed?
I am still getting the same error even though i am using 1.50.0.

I am using exactly the same code just for testing but it's showing me the same error.

Here is package.json on my side.
{
"name": "dispensary-client-web",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.4.0",
"@material-ui/icons": "^4.2.1",
"aws-amplify": "^1.1.36",
"aws-amplify-react": "^2.3.12",
"material-table": "^1.50.0",
"node-sass": "^4.12.0",
"notistack": "^0.8.9",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-redux": "^7.1.1",
"react-router-dom": "^5.0.1",
"react-scripts": "3.1.1",
"redux": "^4.0.4",
"redux-saga": "^1.0.5",
"reduxsauce": "^1.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"precommit": "lint-staged",
"prepush": "lint-staged"
},
"lint-staged": {
"*.{js,jsx}": [
"pretty-quick --staged",
"eslint src/ --fix",
"git add"
]
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "10.0.2",
"eslint": "^6.2.2",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.14.3",
"husky": "^3.0.4",
"lint-staged": "^9.2.5",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1"
}
}

FalkF pushed a commit to FalkF/material-table that referenced this issue Jan 18, 2021
Added missing aria labels to pagination component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants