facebookarchive / fixed-data-table

A React table component designed to allow presenting thousands of rows of data.
http://facebook.github.io/fixed-data-table/
Other
4.3k stars 553 forks source link

table is not extended to full width of parent #424

Closed craigcosmo closed 8 years ago

craigcosmo commented 8 years ago

Problem: table is not extended to the width of it's parent

code:

<div style={{width:'100%'}}>
    <Table
        rowHeight={50}
        rowsCount={10}
        width={2000}
        height={500}
        headerHeight={30}>
        <Column
        header={<Cell>First Name</Cell>}
        cell={<Cell>mama</Cell>}
        fixed={true}
        width={100}
        />
        <Column
        header={<Cell>Sentence! (flexGrow greediness=2)</Cell>}
        cell={<Cell>chacha</Cell>}
        flexGrow={2}
        width={200}
        />
        <Column
        header={<Cell>Company (flexGrow greediness=1)</Cell>}
        cell={<Cell>nana</Cell>}
        flexGrow={1}
        width={200}
        />
        <Column
        width={100}
        header={<Cell>Last Name</Cell>}
        cell={<Cell>sasa</Cell>}
        />
    </Table>
</div>

Screenshot

screen_shot_2016-07-15_at_11_25_25_am

I want 4 col table full width, and the table width should be fluid to the it's container, which is a div in this case. And it's not doing that, I don't know what is missing.

git repo demo: https://github.com/craigcosmo/react-boilplate/tree/test-table

craigcosmo commented 8 years ago

solution: https://github.com/facebook/fixed-data-table/issues/289