From a02c981b74f1137b5440caa772a05dc831e0619d Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Mon, 8 Jul 2024 09:47:13 +0800 Subject: [PATCH] table: Fix incorrect column selection bg render. --- crates/ui/src/table.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/crates/ui/src/table.rs b/crates/ui/src/table.rs index 159ae286..1af876e4 100644 --- a/crates/ui/src/table.rs +++ b/crates/ui/src/table.rs @@ -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| {