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