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 when getting data dynamically from another component using @Input #7

Closed
jigneshkhatri opened this issue Dec 25, 2017 · 1 comment
Assignees

Comments

@jigneshkhatri
Copy link

jigneshkhatri commented Dec 25, 2017

I am getting following error when I am getting data dynamically from another component:

ERROR TypeError: Cannot read property 'isFirstChange' of undefined
at Ng2YaTableComponent.ngOnChanges (index.js:256)

I have made separate component for table and using this component in other components. Below is the code of my table component.

Below is my code:
`

@Input() data: any[] = [];
@Input() columns: any[] = [];

constructor() {
 
}

public options:any = {
    orderMulti: false,
    className: ['table-striped'],
    language: "en"
}

public paging: any = {
    itemsPerPage: 10,
    itemsPerPageOptions: [10, 25, 50, 100],
    maxSize: 5
}

`

<ng2-ya-table [options]="options" [columns]="columns" [datasource]="data" [paging]="paging"> </ng2-ya-table>
I am getting data and columns from another component and they are successfully reaching to this component. What am I missing here?

@vitocmpl
Copy link
Owner

vitocmpl commented Jan 4, 2018

Fixed.
Let me know if it works properly now.

@vitocmpl vitocmpl self-assigned this Jan 4, 2018
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

2 participants