Button in column doesn't work after vertical scroll
See original GitHub issueI’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
- Table version: 0.8.x
latest table version
- Angular version: 2.0.x
latest angualr version (5.0)
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
- Language: [all | TypeScript X.X | ES6/7 | ES5] latest typescript
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6
Top GitHub Comments
I have the same problem any solutions ?
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 way button execute normally after scrolling.