zyslife / react-native-head-tab-view

Add collapsible headers to your tab-view components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This plugin is not applicable to @react-navigation/native-stack

bojianyin opened this issue · comments

When it is just opened, it can work normally. When the viewpager has two, I scroll the first screen to the middle, and then slide to the second screen. At this time, the scroll distance of the second screen is 0, and then scroll down. At this time, I slide to the first screen, and the problem reappears.

After I changed to @react-navigation/native-stack, there was no problem, because the official example used @react-navigation/native-stack. I checked this problem for a long time. It turned out that I used @react-navigation/native-stack

When @react-navigation/native-stack is used, the control can be used normally. Slide to the second screen, and then scroll back to the first screen. The scrolling distance of the first screen should be reset and recalculated

Package versions

  • React:17.0.2
  • React Native:0.65.1
  • React-Native-Gesture-Handler:2.1.0
  • @react-navigation/native-stack:6.1.0

I am very sure that it is an existing bug. I hope the author can fix it, because this library is a very good solution for reactnative to implement Scrollview + viewpager. Thank you very much for providing such a tool. Thank you

@bojianyin Thank you very much for your attention. Can you provide a simple project to demonstrate this problem?

Tomorrow or the day after tomorrow, I will provide a demo of problem recurrence

2021-12-12.09.20.56.mp4

@zyslife Hello, author, I have uploaded the demo case that can reproduce this error to my warehouse address. Please help troubleshoot the problem and fix the bug as soon as possible. Thank you very much!
see -> https://github.com/bojianyin/headtabviewdemobug.git

@bojianyin I have tried your demo on iOS and everything is normal. I haven't had time to test it on Android yet. I think I will do it tomorrow.
I guess React-Native-Gesture-Handler is not enabled properly.I'll get a final verdict after I test it on Android tomorrow, but before that you can try to check if React-Native-Gesture-Handler works.

@bojianyin The reason is that react-navigation6 is incompatible with React-Native-Gesture-Handler . same issue

@zyslife Thanks for the author's attention. It's really because of this. The problem has been solved. Thank you