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

Table automatic Height based on parent div #2406

Closed
nfnvsc opened this issue Mar 20, 2022 · 3 comments
Closed

Table automatic Height based on parent div #2406

nfnvsc opened this issue Mar 20, 2022 · 3 comments

Comments

@nfnvsc
Copy link

nfnvsc commented Mar 20, 2022

What problem does this feature solve?

Currently the Table component only allows the height prop to be manually set, or either to use the autoHeight prop which does not seem to respect the parent div size.

What does the proposed API look like?

The idea is to create a new prop, or to add the possibility to set a % on the current height prop so that it can automatically scale with the height of the parent div just like the width does.

@simonguo
Copy link
Member

simonguo commented Apr 4, 2022

rsuite/rsuite-table#330

Use fillHeight to force the height of the table to be equal to the height of its parent container. Cannot be used together with autoHeight.

<div style={{ height:'30rem' }}>
   <Table fillHeight>
   ...
   </Table>
</div>

@SevenOutman
Copy link
Member

fillHeight is now available in 5.9.0

@Christof-K
Copy link

Christof-K commented Feb 9, 2023

Does fillHeight only work on explicit parent height? What if parent is 100% height flex box?
Unfortunately it does not have any effect either of those cases.

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

No branches or pull requests

4 participants