Skip to content

Commit 60b3522

Browse files
committed
Ensure that dbl-clicking header while sorting works
1 parent 37247bf commit 60b3522

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sweet/ui/widgets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,8 +2054,10 @@ def _show_row_column_delete_modal(self, row: int, col: int | None = None) -> Non
20542054
else:
20552055
return
20562056

2057-
if target_col < len(self.data.columns):
2058-
column_name = self.data.columns[target_col]
2057+
# Get visible columns (excluding tracking columns) to ensure correct indexing
2058+
visible_columns = [col for col in self.data.columns if col != "__original_row_index__"]
2059+
if target_col < len(visible_columns):
2060+
column_name = visible_columns[target_col]
20592061

20602062
def handle_column_action(choice: str | None) -> None:
20612063
if choice == "delete-column":

0 commit comments

Comments
 (0)