Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize cell height #211

Open
AdamMoffitt opened this issue Jan 7, 2020 · 2 comments
Open

Resize cell height #211

AdamMoffitt opened this issue Jan 7, 2020 · 2 comments

Comments

@AdamMoffitt
Copy link

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

@dylancom
Copy link
Contributor

dylancom commented Apr 9, 2020

@AdamMoffitt I was struggling with this too, but just found you can put a "height" prop on item:
<Item height="70" />

@RexYao97
Copy link

RexYao97 commented Sep 13, 2022

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>
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants