react-native-tableview
react-native-tableview copied to clipboard
Resize cell height
Hello, I'm trying to implement custom cells and am unable to change the cell heights. In the documentation you mention being able to manipulate cell heights, but I am not seeing a way to do that. The cells are always the same narrow height of the basic table cell. Help would be much appreciated
@AdamMoffitt I was struggling with this too, but just found you can put a "height" prop on item:
<Item height="70" />
i meet same problem too.Finally, i use Cell instand of Item to render.you can link to here get more detail. simple code
import TableView from 'react-native-tableview';
const { Section, Item, Cell } = TableView;
...
render() {
<TableView
style={{ flex: 1}}
allowsToggle
allowsMultipleSelection
tableViewStyle={TableView.Consts.Style.Grouped}
tableViewCellStyle={TableView.Consts.CellStyle.Subtitle}
onPress={(event: any) => console.log(event)}
reactModuleForCell='TableViewExampleCell'
>
<Section label="Section 3" arrow={false}>
<Cell componentHeight={80}>
<View>
<Text>Cell 11</Text>
<Text>Cell 12</Text>
<Text>Cell 13</Text>
<Text>Cell 14</Text>
<Text>Cell 15</Text>
<Text>Cell 16</Text>
<Text>Cell 17</Text>
</View>
</Cell>
<Cell componentHeight={80}><Text>Cell 2</Text></Cell>
<Cell componentHeight={80}><Text>Cell 3</Text></Cell>
</Section>
</TableView>
}