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.

Scroll to top does not work

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

Current behavior Have a table with h and v scrolling. Scroll to the bottom, reload the rows and set offset to 0 to move the scroll position to the top. However, it does not affect the scroll position.

Expected behavior Move to the top when this.table.offset = 0

Reproduction of the problem https://plnkr.co/edit/iGyPA7TD46Y8BfSjVA7L

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 0.7.x
  • Angular version: 2.0.x
  • 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 ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
amcdnlcommented, May 5, 2017

Would exposing this.bodyComponent.updateOffsetY(this.offset); help you?

5reactions
LukeTcommented, Nov 13, 2017

Also running into this, as a work around you can call this.table.element.getElementsByTagName('datatable-body')[0].scrollTop = 1; once you’ve updated the rows which causes the hidden rows to be displayed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need to scroll to the top of the page? - CSS-Tricks
I've found back-to-top anchors work even if the ID/class for “top” is not defined. However smooth scrolling does need a target anchor or...
Read more >
How to scroll to top of page with JavaScript/jQuery?
When I scroll my page half way down, then trigger a reload, I want the page to go pack to the top, but...
Read more >
Can't Fix – Won't Scroll to Top | WordPress.org
I tried the solutions here https://wordpress.org/support/topic/wont-scroll-back-to-top/ but they didnt work, in fact the last one killed my site.
Read more >
overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, ...
Read more >
Scroll to Top does not work in drawer-content #431 - GitHub
Thanks @saadeghi Using document.querySelector('.drawer-content').scrollTo({ top: 0 }) worked!
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