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

DataTable in IE: TypeError: Object expected #554

Closed
l3omtz opened this issue Aug 29, 2018 · 2 comments
Closed

DataTable in IE: TypeError: Object expected #554

l3omtz opened this issue Aug 29, 2018 · 2 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@l3omtz
Copy link

l3omtz commented Aug 29, 2018

Getting this error when using DataTable in IE: TypeError: Object expected
Not sure why. is there a poly fills I need to add?
I added all the dependencies in the docs and nothing.
Could really use some help

@cagataycivici
Copy link
Member

Can you replicate at datable showcase?

https://www.primefaces.org/primereact/#/datatable

@l3omtz
Copy link
Author

l3omtz commented Aug 30, 2018

I tried that too :/ @cagataycivici
And I even cloned the primereact-quickstart that you guys provided to make sure it wasn't something on my project that was causing the issue.
This is the code from that repo and the datatable component added to it

import React, { Component } from 'react';
import {Button} from 'primereact/button';
import logo from './logo.png';
import './App.css';
import 'primereact/resources/themes/omega/theme.css';
import 'primereact/resources/primereact.min.css';
import 'primeicons/primeicons.css';
import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';


class App extends Component {
    
    constructor() {
        super();
        this.state = {count: 0, cars: [ 
          { time: "10:15", destination: "Kamino", flight: "BOBBA"},
          { time: "11:20", destination: "Hoth", flight: "C3PO"},
          { time: "11:40", destination: "Jakku", flight: "BB8" },
          { time: "14:00", destination: "Kashyyyyk", flight: "WOOK1E" },
          { time: "15:15", destination: "Endor", flight: "W1CKET",  },
          { time: "16:05", destination: "Alderaan", flight: "LE1A" },
          { time: "18:20", destination: "Kessel", flight: "HAN5O1O" },
          { time: "14:45", destination: "Endor", flight: "MI544" },
          { time: "07:10", destination: "koin", flight: "KJ300" },
          { time: "09:31", destination: "Nibiru", flight: "SOLQ23" },
        ]};
        this.increment = this.increment.bind(this);
    }
    
    increment() {
        this.setState({count: this.state.count + 1});
    }
    
    render() {
        return (
          <div className="App">
            <div className="App-header">
              <img src={logo} className="App-logo" alt="logo" />
              <h2>Welcome to PrimeReact</h2>
            </div>
            <div className="App-intro">
              <Button label="Click" icon="pi pi-check" onClick={this.increment} />
              
              <p>Number of Clicks: {this.state.count}</p>
            </div>
            <DataTable value={this.state.cars}>
                <Column field="time" header="Time" />
            </DataTable>
          </div>
        );
    }
}

export default App;

and a screenshot of what I get once I add the datatable component
ie-datatable-issue

and my package.json file

{
  "name": "primereact-quickstart",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-scripts": "1.1.1"
  },
  "dependencies": {
    "classnames": "^2.2.6",
    "primeicons": "1.0.0-beta.9",
    "primereact": "2.0.0-beta.1",
    "prop-types": "^15.6.2",
    "react": "^16.4.0",
    "react-dom": "^16.4.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}


@cagataycivici cagataycivici added this to the 2.0.0-beta.4 milestone Sep 11, 2018
@cagataycivici cagataycivici self-assigned this Sep 11, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a defect related to a specific component. label Sep 11, 2018
@cagataycivici cagataycivici changed the title DatabTable in IE: TypeError: Object expected DataTable in IE: TypeError: Object expected Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants