Jeepeng/react-native-simple-table

Auto-height

pstanton opened this issue · 3 comments

How do I allow the table to set it's own height based on the rendered size?

This library is very chaotic and not finished at all, i was trying to figure out this question for a longer time, one very weird and not properly working solution seems to be that you get the height of each column and sum it together for this to happen you need to edit table.js directly and pass onlayout property of column view to your main.js and there you just set that to state and pass it to table as height={this.state.value}

If someone found better solution or even better lib for tables please tell me i would be very thankful!

You can pass height='100%'
It worked for me.
<Table height='100%' columns={columns} dataSource={dataSource} />

Screenshot_1558545212
Sorry for commenting after 1 and the half year