question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button in column doesn't work after vertical scroll

See original GitHub issue

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).

image1

image2

image3

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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:6

github_iconTop GitHub Comments

5reactions
Samuel4321commented, Jan 15, 2018

I have the same problem any solutions ?

2reactions
Samuel4321commented, Jan 17, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vertical Scroll Stopped Working In ONLY 1 Tab In Excel
I have encountered this problem on a few occasions. Often, the source of the problem is that "Select Objects" is active. This causes...
Read more >
Column are shifting when there is vertical scroll bar attached
The why is because there is not enough room within the parent for the scrollbar to fit, thus it shrinks the other elements...
Read more >
Excel Vertical Scroll Bar Stops Working - 2423 - YouTube
I have a problem in Excel. About a week ago, the vertical scroll bar on an Excel worksheet stopped working. I lost the...
Read more >
Can't Scroll in Excel? Here Are Reasons and Easy Fixes!
You cannot scroll in Excel? Here are four different potential reasons and simple solutions! Try these and you will be able to scroll...
Read more >
::-webkit-scrollbar - CSS: Cascading Style Sheets | MDN
The ::-webkit-scrollbar CSS pseudo-element affects the style of an element's scrollbar when it has overflow:scroll; set.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found