Skip to content

Fixed can't work if this component is used in sub container. #4

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

malikid
Copy link

@malikid malikid commented Jun 1, 2017

Related to #2 . What I added are two optional attributes for users deciding to use custom "window" and "document" (when used in a container) or the default ones.

@YumHax
Copy link

YumHax commented Jun 2, 2017

Hey! Thank you for improving this component! Can you please provide us with further documentation on how to apply the scrolling behaviour to a subcontainer?

I tried this :

<Container id="myContainerName">
      <table id="myDataTableName">
             ...
      </table> 
     <ReactScrollPagination documentElement="#myDataTableName" windowElement="#myContainerName" fetchFunc ={...} />
</Container>

but could not make it work :(

EDIT : finally works as intended ! My imports did not point to your version of the component but to the master one. Thank you for the good work ! :)

@malikid
Copy link
Author

malikid commented Jun 3, 2017

Glad it helps! I should add the usage of the attributes in README.

@@ -45,11 +47,13 @@ var ReactScrollPagination = _react2.default.createClass({
isolate: {
onePageHeight: null,
timeoutFuncHandler: null,
excludeTopMargin: null,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malikid
Thanks so much for your pr, one question, is the prop excludeTopMargin works same as the prop excludeHeight, if so, maybe you can comment hte excludeHeight as deprecated.

@codingfishman
Copy link
Owner

@malikid
It would be a great help if you can update the demo :), the original one is here: https://jsfiddle.net/nickday/dat4qpam/

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.

3 participants