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

Add scrollTop method to ScrollPanel #5787

Closed
cyberrranger opened this issue May 23, 2018 · 0 comments
Closed

Add scrollTop method to ScrollPanel #5787

cyberrranger opened this issue May 23, 2018 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cyberrranger
Copy link

I'm submitting a ... (check one with "x")


[*] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap

https://www.primefaces.org/primeng/#/scrollpanel

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

i use p-table in a scrollpanel, and if a user open the page with the scrollpanel the content should scroll to top, i used this with:

constructor(@Inject(DOCUMENT) private document: Document) {

setTimeout(() => { let scroll = this.document.body.getElementsByClassName("ui-scrollpanel-content")[0]; if (scroll) { scroll.scrollTop = scroll.scrollHeight; } }, 1000);

  • Angular version: 5.X
  • PrimeNG version: 5.X
  • Browser: [all ]
  • Language: [all]
@cagataycivici cagataycivici added this to the 7.0.5 milestone Dec 31, 2018
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Dec 31, 2018
@cagataycivici cagataycivici changed the title IDEE ScrollPanel jump/scroll to top (with solution) Add scrollTo method to ScrollPanel Dec 31, 2018
cagataycivici added a commit that referenced this issue Jan 23, 2019
fixed #5787 Add scrollTo method to ScrollPanel
@cagataycivici cagataycivici changed the title Add scrollTo method to ScrollPanel Add scrollTop method to ScrollPanel Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

4 participants