table: Fix disabled sort field change to default (#451)

Co-authored-by: linxin <xin.lin@longbridge-inc.com>
This commit is contained in:
Ylin 2024-12-02 11:28:16 +08:00 committed by GitHub
parent 8c464d6709
commit 09455df61c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -535,9 +535,11 @@ where
if ix == col_ix { if ix == col_ix {
col_group.sort = Some(sort); col_group.sort = Some(sort);
} else { } else {
if col_group.sort.is_some() {
col_group.sort = Some(ColSort::Default); col_group.sort = Some(ColSort::Default);
} }
} }
}
self.delegate_mut().perform_sort(col_ix, sort, cx); self.delegate_mut().perform_sort(col_ix, sort, cx);