Wednesday, July 31, 2024
HomeiOS Developmentjavascript - Issues on flatlist scroll in iOS

javascript – Issues on flatlist scroll in iOS


I’ve a Flatlist, easy flatlist. The scroll in iOS solely do if I take advantage of 3 fingers.
Every record on flatlist, is a touchableOpacity, the button could be a drawback?
I would like make the scroll with 1 finger;

   <FlatList
     knowledge={choices.choices}
     keyExtractor={(merchandise) => String((merchandise as any).id)}
     showsHorizontalScrollIndicator={false}
     showsVerticalScrollIndicator={true}
     initialNumToRender={10}
     maxToRenderPerBatch={10}
     renderItem={ListItem}
   />

Merchandise

operate ListItem({ merchandise }: { merchandise: Merchandise }) {
    return (
      <TouchableOpacity
        key={merchandise.worth}
        model={{
          top: 50,
          justifyContent: 'heart',
          alignItems: 'heart',
          borderBottomWidth: 1,
          borderColor: theme.palette.border,
        }}
        onPress={() => onItemSelected(merchandise)}
      >
        <Orientation.Row
          model={{ justifyContent: 'heart', hole: 8, width: 280 }}
        >
          {choices.chosen?.worth === merchandise.worth && (
            <FontAwesome5 title="examine" measurement={12} colour={theme.palette.textual content} />
          )}
          <Typography.Default
            model={{
              fontSize: 18,
              fontFamily: theme.fonts.BOLD,
              textAlign: 'heart',
            }}
          >
            {merchandise.label}
          </Typography.Default>
        </Orientation.Row>
      </TouchableOpacity>
    );
  }

I would like do the scroll within the record with 1 finger, like wherever lists. However in iOS (all I examined), solely make the scroll with 3 fingers. Wtf.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments