Quantcast
Channel: Active questions tagged touchablewithoutfeedback - Stack Overflow
Viewing all articles
Browse latest Browse all 46

How do I enable scrolling of FlatList TouchableWithoutFeedback nested under a Modal?

$
0
0

Here is my setup:

<Modal        statusBarTranslucent        visible={isOpen}        onDismiss={onRequestClose}        onRequestClose={onRequestClose}        animationType={animationPreset}><TouchableWithoutFeedback          onLayout={onLayout}          onPressOut={onRequestClose}><View            style={modalContainerStyle}><TouchableWithoutFeedback><View                style={style.modalChildStyle}>                {children}</View></TouchableWithoutFeedback></View></TouchableWithoutFeedback></Modal>

and here is the FlatList child:

<View><FlatList            data={dataItems}            scrollEnabled            keyExtractor={(item) => item.id}            renderItem={({item}) => (<SomeComponent someComponentData={item} />)}   /></View

The FlatList doesn't scroll!

I tried adding onStartShouldSetResponder={() => true} to Views within the Modal and the one wrapping the FlatList, and none works. I also tried adding style={{flex: 1}} and that doesn't work either.


Viewing all articles
Browse latest Browse all 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>