Skip to content

patchfix: fix ref on ScrollSyncPanel not working #90

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

Conversation

vanntrong
Copy link
Contributor

Issue: when passed a ref to child component inside ScrollSyncPane, this should be pass to use, but what we do here is create a new ref and clone child element

What I do:

  • I created a propTypes innerRef for ScrollSyncPane, this will check if innerRef exist so we pass innerRef to child component, if not, we create one.

@okonet
Copy link
Owner

okonet commented Mar 8, 2023

This is a working solution but do you think you could leverage the ref prop and not rely on the new innerRef

@vanntrong
Copy link
Contributor Author

This is a working solution but do you think you could leverage the ref prop and not rely on the new innerRef

I also tried ref instead of innerRef but it not working, so I found that we need to use innerRef. I follow this stackoverflow's post : https://stackoverflow.com/a/52223103/16864718

@ArturKustyaev
Copy link

you will merge the pool request?

@okonet okonet merged commit bfbd0a9 into okonet:master Oct 24, 2023
@github-actions
Copy link

🎉 This PR is included in version 0.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@just-toby
Copy link

FYI @vanntrong @okonet i submitted a PR to DefinitelyTyped to reflect this change: DefinitelyTyped/DefinitelyTyped#67820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants