table: Fix horizontal scroll range when no fixed columns. (#1089)

This commit is contained in:
Jason Lee 2025-07-24 15:35:14 +08:00 committed by GitHub
parent 634ab14306
commit 56cf05b749
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -1001,7 +1001,7 @@ where
.children(
self.col_groups
.iter()
.filter(|col| col.column.fixed == None)
.skip(left_columns_count)
.enumerate()
.map(|(col_ix, _)| {
self.render_th(left_columns_count + col_ix, window, cx)

View file

@ -128,6 +128,8 @@ impl VirtualList {
}
/// Specify for table.
///
/// Table is special, because the `scroll_handle` is based on Table head (That is not a virtual list).
pub(crate) fn with_scroll_handle(mut self, scroll_handle: &ScrollHandle) -> Self {
self.base = div().id(self.id.clone()).size_full();
self.scroll_handle = scroll_handle.clone();