-
Notifications
You must be signed in to change notification settings - Fork 877
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
onComponentInitFunction doesnot working #364
Comments
Had the same problem. Appears to be an issue with the packages in npm. If I build from source, it works as expected. |
Hi! Could you provide a detailed solution? I'm facing the same issue. Thanks! |
You need download from this repository and build the module. Use gulp git clone https://github.com/akveo/ng2-smart-table.git |
Keep in mind that the root of the git repo contains the demo app. The actual source for ng2-smart-table is in the subfolder "<path_to_local_git_repo>/src/ng2-smart-table". |
I think the latest version does not have rowData accessible through ViewCell interface. Only value is there. So rowData comes as undefined. |
Hi, |
In the component
onComponentInitFunction(instance)
View in console @pakajni you emit the component (this) or rowData variable, the example only emit value |
Agreed that you need to emit the event. However, I still believe there is something wrong with the packages in the npm repository. If you search the JS in those packages, there is no sign of he onComponentInitFunction being called. This is contrary to the trans-compiled source checked out from git. |
This fix was 19 days ago, possibly have not changed version and the package has not been updated in NPM |
I still have the same problem. I did Thanks |
Thank you! I updated my ng2-smart-table from 1.1.0 to 1.2.2 and it resolved it. |
@KeaganFouche |
Just update the ng2-smart-table and works for me! Thanks everbody |
Hi,
The method onComponentInitFunction in settings of table (as in demo site) is not fiting when i install ng2-smart-table from npm. My table settings:
settings = {
columns: {
User: {title:"Users"},
Plan{
title: "Plan",
type: 'custom',
renderComponent: IconViewComponent,
onComponentInitFunction(instance) {
instance.click.subscribe(row => {
},
};
The IconViewComponent is rendering correctly.
Do I need to set some extra parameters or any other requirements?
Thanks in advance
Audrius
The text was updated successfully, but these errors were encountered: