jeremybarbet / react-native-modalize

A highly customizable modal/bottom sheet that loves scrolling content.
https://jeremybarbet.github.io/react-native-modalize
MIT License
2.84k stars 298 forks source link

How to set height for modal footer when withReactModal is true #459

Closed ricardopacheco closed 2 years ago

ricardopacheco commented 2 years ago
<Modalize
  ref={ref}
  withReactModal={true}
  HeaderComponent={renderHeader}
  FooterComponent={renderFooter}
  reactModalProps={{ animationType: 'slide', statusBarTranslucent: true }}
  flatListProps={{
    data: comments,
    renderItem,
    showsVerticalScrollIndicator: false,
    onEndReached: fetchBackEndComments,
    onEndReachedThreshold: 0.2
  }}
  modalStyle={{ flex: 1, padding: 10 }}
  onClosed={() => {
    Emitter.emit('CLOSE_TEXT_MODAL');
    reset();
  }}
/>
ricardopacheco commented 2 years ago

This is fixed using View inside same component!

const renderFooter = () => (
    <View style={{ height: 35 }}>
      <AddNewTextForm />
    </View>
  )