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

Unable to get click from button inside cell #510

Open
tanveerrafiqueIVL opened this issue Dec 14, 2018 · 0 comments
Open

Unable to get click from button inside cell #510

tanveerrafiqueIVL opened this issue Dec 14, 2018 · 0 comments

Comments

@tanveerrafiqueIVL
Copy link

tanveerrafiqueIVL commented Dec 14, 2018

Hi,
I've rendered html of button inside cell but I can't get the onclick of it in my angular 5's component. Does anyone know the way of doing it? I tried angular's (click) functionality too but nothing worked, tried to call aler on onclick and got no success.

columns.push({ data: index, renderer: function percentRenderer(instance, td, row, col, prop, value, cellProperties) { Handsontable.renderers.HtmlRenderer.apply(this, arguments); if(value.data == 'TRUE'){ td.innerHTML = '&#10004;'; } else if(value.data == 'FALSE'){ td.innerHTML = '&#10006;'; } else if(value.data == 'UNMARKED'){ td.innerHTML = '<button onclick="alert(\'clicked\')" value="\'TRUE\'">&#10004;</button> <button value="\'FALSE\'">&#10006;</button>'; } else{ td.innerHTML = value.data; } } });

Please help, thanks

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

1 participant