react-native-collapsible-tab-view icon indicating copy to clipboard operation
react-native-collapsible-tab-view copied to clipboard

Known issue: flashlist does not take full height

Open andreialecu opened this issue 1 year ago • 11 comments

Flashlist does not support minHeight in contentContainerStyle resulting in an issue if there isn't enough content to fill the screen when swiping between panes.

See video below for an explanation:

https://user-images.githubusercontent.com/697707/233771319-5087ff0b-edd3-40a2-9d14-98c6cbb4f1b4.mp4

andreialecu avatar Apr 22 '23 08:04 andreialecu

Can be repro'd by uncommenting these lines in the example:

https://github.com/PedroBern/react-native-collapsible-tab-view/blob/834dc4b9c0edc93feaa8ff4affa93f266a248232/example/src/Shared/ExampleComponentFlashList.tsx#L33-L34

andreialecu avatar Apr 22 '23 08:04 andreialecu

Not sure if helpful but:

  • I think flashlist needs a height all the time in order to correctly render the list.
  • if you wrap the react-native-collapsible-tab-view/example/src/Shared/ContactsFlashList.tsx with a View with fixed height and subtract the const { top } = useHeaderMeasurements() like this:
<View style={{ height: height - top.value }} >
<Tabs.FlashList>
...
</View>

where height is const height = useWindowDimensions().height at least it is stuck on the previous tab scroll value. 🤷‍♂️ hope it helps

https://github.com/PedroBern/react-native-collapsible-tab-view/assets/21178754/242adc6d-af2a-433f-9d6c-8150757e5132

gkartalis avatar May 22 '23 17:05 gkartalis

i got this issue hope will have solution soon

ngocan3897 avatar Jun 16 '23 03:06 ngocan3897

Any update?

zRelux avatar Sep 05 '23 13:09 zRelux

You can bypass this by wrapping the flashlist in the tabs scrollview

zRelux avatar Sep 11 '23 08:09 zRelux

I tried, it doesn't seems to work at all

senghuotlay avatar Sep 13 '23 01:09 senghuotlay

You can bypass this by wrapping the flashlist in the tabs scrollview

But 'onRefresh' and 'onEndReached' are not working

beh0907 avatar Sep 13 '23 07:09 beh0907

Not sure if helpful but:

  • I think flashlist needs a height all the time in order to correctly render the list.
  • if you wrap the react-native-collapsible-tab-view/example/src/Shared/ContactsFlashList.tsx with a View with fixed height and subtract the const { top } = useHeaderMeasurements() like this:
<View style={{ height: height - top.value }} >
<Tabs.FlashList>
...
</View>

where height is const height = useWindowDimensions().height at least it is stuck on the previous tab scroll value. 🤷‍♂️ hope it helps

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-05-22.at.19.28.06.mp4

Hi, I am having an issue with the tabBarHeader hiding under the safeAreaView on ios but in this video, the issue is not there, Do you mind sharing the code snippet of this specific video demo?

omotoshogyro avatar Jan 04 '24 14:01 omotoshogyro

+1

VictorioMolina avatar Mar 11 '24 12:03 VictorioMolina

+1

mrtawil avatar Apr 22 '24 12:04 mrtawil

This is an upstream issue with Flashlist.

See this discussion: https://github.com/Shopify/flash-list/discussions/517

andreialecu avatar Jul 24 '24 16:07 andreialecu