widgets(table): fixed an issue w/ active row contents causing the last few rows to disappear
This commit is contained in:
parent
2580a8fc12
commit
eaa9c1580a
1 changed files with 2 additions and 2 deletions
|
@ -235,7 +235,7 @@ pub fn drawTable(
|
|||
const max_items =
|
||||
if (data_items.len > table_win.height -| 1) table_win.height -| 1 else data_items.len;
|
||||
var end = table_ctx.start + max_items;
|
||||
if (table_ctx.row + table_ctx.active_y_off >= end -| 1)
|
||||
if (table_ctx.row + table_ctx.active_y_off >= win.height -| 2)
|
||||
end -|= table_ctx.active_y_off;
|
||||
if (end > data_items.len) end = data_items.len;
|
||||
table_ctx.start = tableStart: {
|
||||
|
@ -250,7 +250,7 @@ pub fn drawTable(
|
|||
break :tableStart table_ctx.start;
|
||||
};
|
||||
end = table_ctx.start + max_items;
|
||||
if (table_ctx.row + table_ctx.active_y_off >= end -| 1)
|
||||
if (table_ctx.row + table_ctx.active_y_off >= win.height -| 2)
|
||||
end -|= table_ctx.active_y_off;
|
||||
if (end > data_items.len) end = data_items.len;
|
||||
table_ctx.start = @min(table_ctx.start, end);
|
||||
|
|
Loading…
Add table
Reference in a new issue