table: Fix incorrect column selection bg render.

This commit is contained in:
Jason Lee 2024-07-08 09:47:13 +08:00
parent 9b51a5b998
commit a02c981b74

View file

@ -395,16 +395,19 @@ where
.id(("table-row", row_ix))
.w_full()
.children((0..cols_count).map(|col_ix| {
table.col_wrap(col_ix, cx).child(
table
.render_cell(col_ix, cx)
.flex_shrink_0()
// Make the row scroll sync with the horizontal_scroll_handle to support horizontal scrolling.
.left(horizontal_scroll_handle.offset().x)
.child(
table.delegate.render_td(row_ix, col_ix),
),
)
table
.col_wrap(col_ix, cx) // Make the row scroll sync with the horizontal_scroll_handle to support horizontal scrolling.
.left(horizontal_scroll_handle.offset().x)
.child(
table
.render_cell(col_ix, cx)
.flex_shrink_0()
.child(
table
.delegate
.render_td(row_ix, col_ix),
),
)
}))
.when(row_ix > 0, |this| this.border_t_1())
.hover(|this| {