wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.44k stars 706 forks source link

Cannot scroll into ActionSheet #2873

Open SupriyaPKalghatgi opened 8 months ago

SupriyaPKalghatgi commented 8 months ago

Description

I have wrapped Flatlist into ActionSheet. Flatlist items do not scroll into actionsheet

Related to

Code snippet

      <ActionSheet
        options={actionSheetOptions}
        visible={isActionSheetVisible}
        onDismiss={() => {}}
        renderAction={renderAction}
        containerStyle={{
          height: height,
        }}
      />

  const renderAction = (option: ButtonProps, index: number) => {
    return (
      <View key={index}>
          <ActionSheetItemsList />
      </View>
    )
  }

  const ActionSheetItemsList = () => {
    return (
       <FlatList
        data={data}
        renderItem={({ item }: any) => renderItem(item)}
        keyExtractor={(_item, index) => index.toString()}
      />
    )
  }

Environment

Affected platforms

SupriyaPKalghatgi commented 8 months ago

@ethanshar Similar issue without solution https://github.com/wix/react-native-ui-lib/issues/1691 https://github.com/wix/react-native-ui-lib/issues/1505

SupriyaPKalghatgi commented 8 months ago

@NitzanWix Is there a way to fix this?

SupriyaPKalghatgi commented 7 months ago

@ethanshar I am stuck at this issue over a month and I dont get any response from the team

thalida commented 1 month ago

I just ran into this issue with the Dialog, I was able to resolve by adding renderScrollComponent={ScrollView} to the nested FlashList. In my case I had to use the react-native-gesture-handler ScrollView.

pseudo code:

import { ScrollView } from "react-native-gesture-handler";
<Dialog>
    <FlashList 
        renderScrollComponent={ScrollView}
        {...other props}
    />
</Dialog>

@SupriyaPKalghatgi I know it's been a while, were you able to resolve this another way? I am concerned w/ the lack of responses on this library. I may have to find a new system to use. :\