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

auto grow all columns? #16

Open
yocontra opened this issue Mar 5, 2018 · 2 comments
Open

auto grow all columns? #16

yocontra opened this issue Mar 5, 2018 · 2 comments

Comments

@yocontra
Copy link

yocontra commented Mar 5, 2018

is this possible? i've tried it by adding the fitcolumn plugin for each column but it ends up laying out really bad. i think this is a super common use case - i just want to render data in a table, i don't care how wide anything is because the width will vary depending on what i render. if i have one column that has super long values and one with some small values it would handle that nicely.

@tafel
Copy link
Contributor

tafel commented May 11, 2021

What is problematic here is that you need to know the width of all your cells first, then calculate a ratio to determine width for each column.

The goal of this lib is to provide a quick way to draw data in a table. Predefined widths is a lot more optimized than calculating by parsing everything.

If you find a decent way to do that, please create a new PR, so we can discuss that here and see what is possible.

@yocontra
Copy link
Author

@tafel Luckily you can only fit so many rows on a page, and if you draw each page one at a time you could quite easily buffer a page worth of rows, compute the sizes, then render the page. Just a thought - if out of scope for this library feel free to close this issue.

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

2 participants