I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
I have created a ngx-datatable with one column that has a button inside of it. this button click works fine when i load the route with the datatable, however when i scrol in the table and click it again it doesnt work anymore somehow?
Expected behavior
The button should always work even if i have scrolled a bit down through the table.
Reproduction of the problem
So the first image shows the freshly loaded component with the ngx-datatable. When i click the button (marked) in red, the router routs to another page and works fine. However when i re-run the application and scroll down a bit after the component is loaded (see image 2). The same button doesnt work anymore and gives the following result (see image 3).



SO MY QUESTION WHY DOES VERTICAL SCROLLING AFFECT THE EXECUTION OF THE BUTTON, NOTHING CHANGES EVEN IF I CONSOLE.LOG(EVERYTHING I PASS TO THE METHOD FROM THE TABLE)????
What is the motivation / use case for changing the behavior?
see description above
Please tell us about your environment:
windows 10, Visual studio code, npm
I have the same problem any solutions ?
Tengo el mismo problema, hace mas de un mes que esta la pregunta, espero una respuesta r谩pida si puede ser.
This is still an issue for me haven't fixed it and I also asked this question on stackoverflow. But nobody could help us as well. Hopefully there will be a fix soon.
Hello ,
I got a temporary quick fix :
On button in Dom :
(click)="execFunctionInTable.next({functionName:'Name of your function',parameters:[parameters]})"
In component :
public execFunctionInTable = new Subject<{functionName:string,parameters:Array<any>}>();
In constructor component :
private ngZone: NgZone (import NgZone from @angular/core)
In constructor or ngOnInit component :
this.execFunctionInTable.subscribe(value => {
this.ngZone.run(()=>{
this[value.functionName](...value.parameters);
})
})
This way button execute normally after scrolling.
@Samuel4321 You Sir are my hero, the temporary fix works!!! Thank you so much <3
Why is the issue closed? The provided solution is just a workaround.
Most helpful comment
I have the same problem any solutions ?