React-custom-scrollbars: scrollTo event

Created on 7 Feb 2017  路  2Comments  路  Source: malte-wessel/react-custom-scrollbars

First off, great library. I need to scroll to a certain element in the container, what would be the best way to do that?

help wanted

Most helpful comment

  • reference scrollbars component and the element you want to scroll to
  • grab the top position of the element inside the container
  • call scrollbars.scrollTop(topPositionOfElement)

All 2 comments

  • reference scrollbars component and the element you want to scroll to
  • grab the top position of the element inside the container
  • call scrollbars.scrollTop(topPositionOfElement)

element.scrollTop is always 0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bunkat picture bunkat  路  5Comments

webchaz picture webchaz  路  3Comments

anupmishra203 picture anupmishra203  路  3Comments

simonkberg picture simonkberg  路  3Comments

Amdingo picture Amdingo  路  4Comments