Skip to content

Conversation

hhhonzik
Copy link

I am using react-gemini-scrollbar library in my project and i find it very helpful.

But today I was adding react-scroll library which needs a containerId - which can be obtained with scrollbar.getViewElement().

I added context support to the component, so now you can get the instance like this:

class Button extends React.Component {
  static contextTypes = {
    geminiScrollbar: React.PropTypes.object
  };

  onClick() {
    console.log(this.context.geminiScrollbar.get().getViewElement);
  }

I also refactored the component as Class while doing that.

@JakubKontra
Copy link

+1

@milan182
Copy link

milan182 commented Oct 6, 2016

+1

This will really helpful - We need to add our own scroll event listener on the scrollbar.getViewElement() to implement a infinite scroll feature.

@neolectron
Copy link

up ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants