Skip to content

Conversation

@lautarodragan
Copy link
Contributor

@lautarodragan lautarodragan commented May 14, 2025

"Fixes" a weird issue caused by cargo resolving two different versions of ratatui when not using the current Cargo.lock file (as it is on the main branch right now).

I didn't really properly test this — just did cargo run -r -- a_file.xls.

Please see #10 for more context.

let table = Table::new(
// Combine header and data rows
std::iter::once(header).chain(rows),
[Constraint::Length(1)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Table::new now requires two args. Hard-coding a single Constraint::Length(1) is me being lazy. I have no idea whether this is OK.

@fuhan666
Copy link
Owner

Versions of ratatui above 0.24.0 caused problems with auto-fit column width (845fa42). I tested all versions above 0.24.0 and consistently ran into problems. To ensure the auto-fit column width works as expected, I've downgraded back to 0.24.0 (2633fd8).

ratatui 0.27.0
ratatui-0 27 0

ratatui 0.24.0
ratatui-0 24 0

@lautarodragan
Copy link
Contributor Author

Uh, that's a pity. Thank you for explaining that, though.

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

Successfully merging this pull request may close these issues.

2 participants