Merge PR #1724: Tables: add the missing Resize Table button (#935)

This commit is contained in:
aiongg
2026-10-22 02:34:58 +00:00
2 changed files with 23 additions and 0 deletions
+18
View File
@@ -562,6 +562,24 @@ impl Dialog {
defaults,
)
}
"tableResize" => {
let (table, range) = app
.session
.active()
.and_then(|d| {
let sh = d.wb.active()?;
let t = sh.table_at(d.selection.active)?;
Some((t.name.clone(), t.range.a1()))
})
.unwrap_or_default();
Dialog::form(
"tableResize",
"Resize Table",
"table.resize",
vec![Text { key: "range", label: "New range for the table:" }],
json!({"table": table, "range": range}),
)
}
"dataValidation" => Dialog::form(
"dataValidation",
"Data Validation",
+5
View File
@@ -2284,6 +2284,11 @@ fn table_design(app: &mut SheetApp, ui: &mut Ui) {
act(app, "table.rename", json!({"table": tname, "name": name}));
}
});
let __k = big_button(ui, Icon::Table, "Resize\nTable", "Resize Table", false);
control_keytip(app, ui, &__k, "dialog:tableResize");
if __k.clicked() {
app.open_dialog("tableResize", json!({}));
}
sep(ui);
let __k = big_button(ui, Icon::Duplicates, "Remove\nDuplicates", "Remove Duplicates", false);
control_keytip(app, ui, &__k, "data.removeDuplicates");