dohooo / react-native-table-component

🌱Build table for react native
MIT License
730 stars 188 forks source link

Wrapping container with `flex: 1` hides table #118

Closed crobinson42 closed 4 years ago

crobinson42 commented 4 years ago

If the surrounding container has flex: 1 the table is not shown, removing flex shows the data OR removing the flexArr prop also fixes this. Any ideas why?

<ScrollView  style={{ flex: 1 }}>
        <Table>
          {tableData.map((rowData, index) => (
            <Row
              data={rowData}
              flexArr={[1, 1, 3, 1]}
              key={index}
              style={[
                index % 2 ? { backgroundColor: '#c3c3c0' } : { height: 100 },
              ]}
              textStyle={styles.headText}
            />
          ))}
        </Table>
      </ScrollView>