Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Commit 8032191

Browse files
committed
chore: fix table example
Third column in table example was using the `Max` constraint. But since version 0.16, the layout system does not add a hidden constraint on the last column which would ensure that it fills the remaining available space (a change that was already mentioned in #525). In addition, `tui` does not support sizing based on content because of its immediate mode nature. Therefore, `Max` is now resolved to `0`. Replacing with `Min` fixes the issue. A new way of specifying constraints is being worked on at #519 which should for more deterministic and advanced layout.
1 parent c8c0329 commit 8032191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/table.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn ui<B: Backend>(f: &mut Frame<B>, app: &mut App) {
149149
.widths(&[
150150
Constraint::Percentage(50),
151151
Constraint::Length(30),
152-
Constraint::Max(10),
152+
Constraint::Min(10),
153153
]);
154154
f.render_stateful_widget(t, rects[0], &mut app.state);
155155
}

0 commit comments

Comments
 (0)