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

Allow custom WindowScroller child with childRef in children function #940

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

TrySound
Copy link
Contributor

@TrySound TrySound commented Jan 2, 2018

findDOMNode is not quite flexible with complex layouts. This PR introduces childRef to improve this. Current behavior uses findDOMNode result until childRef is called

<WindowScroller>
{({ childRef }) => <div ref={childRef} />}
</WindowScroller>

Also bit refactored WindowScroller tests with jest mocks.

@TrySound TrySound requested a review from bvaughn January 2, 2018 16:15
@TrySound TrySound merged commit 6aacced into master Jan 4, 2018
@TrySound TrySound deleted the custom-window-scroller-child branch January 4, 2018 22:09
@bvaughn
Copy link
Owner

bvaughn commented Jan 5, 2018

I have some concerns about this PR.

  • The docs have not been updated.
  • The childRef name is inconsistent with other components such as InfiniteLoader and ColumnSizer; (they all uses registerChild).

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.

2 participants