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

onlyLarge mount, unmount and mount the children again #82

Open
Eden-Eliel opened this issue Mar 1, 2021 · 1 comment
Open

onlyLarge mount, unmount and mount the children again #82

Eden-Eliel opened this issue Mar 1, 2021 · 1 comment

Comments

@Eden-Eliel
Copy link

Eden-Eliel commented Mar 1, 2021

Hello, my name is Eden, and I've been using this library for a while. This library is really great, keep up with your good work.

I did encounter some issue that I would like to be fixed:
Whenever you set the onlyLarge true, the pane child are getting re-rendered.

So I have looked into the source code and found this thing:

{this.state.canScroll ? (
  <TouchableHighlight>
    <React.Fragment>{this.props.children}</React.Fragment>
  </TouchableHighlight>
) : (
  this.props.children
)}

So I assume that whenever I set onlyLarge to true, the canScroll changes and the component getting re-rendered.

rn-swipeable-panel: 1.2.5
react-native: 0.63.4

If you could fix it, that would be awesome.
Thanks.
Eden

@isaachinman
Copy link

Can confirm that this logic is causing the child to render twice, and in my case creating keyboard bugginess (focusing keyboard on mount).

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

No branches or pull requests

2 participants