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

scrollview nested multi flashlist scroll abnormal #1436

Open
vanBlayt opened this issue Dec 4, 2024 · 0 comments
Open

scrollview nested multi flashlist scroll abnormal #1436

vanBlayt opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vanBlayt
Copy link

vanBlayt commented Dec 4, 2024

Current behavior

there are my code。 scrollview nested two flashlist, 

- if i dont limit flashlist height,it will render all items at first time。

- if i use a view element to wrap them, the scrolling will stop when the first list scroll to the bottom.

  <ScrollView
    style={{ flex: 1 }}
    scrollEnabled={outerScrollEnable}
    nestedScrollEnabled
    ref={scrollViewRef}
  >
    {/* <View style={{ height: height, backgroundColor: "#333" }}> */}
    <FlashList
      data={list}
      keyExtractor={keyExtractor}
      renderItem={renderItem}
      estimatedItemSize={68}
      // style={{ flex: 1 }}
      scrollEnabled={goodsScrollEnable}
      nestedScrollEnabled
      onEndReached={handleGoodsEndReached}
    />
    {/* </View> */}
    {/* <View style={{ height, backgroundColor: "#fff" }}> */}
    <FlashList
      data={list2}
      keyExtractor={keyExtractor}
      renderItem={renderItem}
      estimatedItemSize={68}
      // style={{ flex: 1 }}
      scrollEnabled={recommendScrollEnable}
      nestedScrollEnabled
    />
    {/* </View> */}
  </ScrollView>

Expected behavior

  • all items are rendered lazily
  • scrolling is smooth and coherent

To Reproduce

https://github.com/vanBlayt/rn-flashlist-demo
i had pushed code to this repo

Platform:

  • [✅] iOS
  • [✅] Android

Environment

  • node 18
@vanBlayt vanBlayt added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant