Skip to content

Commit

Permalink
virtual list after size takes the actual items len
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Oct 19, 2023
1 parent 804f61b commit fb81257
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/virtual_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ where
items.push(item);
}

after_size = item_size * (total_len.saturating_sub(end)) as f64;
after_size = item_size
* (total_len.saturating_sub(start).saturating_sub(items.len())) as f64;
}
VirtualListItemSize::Fn(size_fn) => {
let mut main_axis = 0.0;
Expand Down

0 comments on commit fb81257

Please sign in to comment.