feat(grid): copy column names and selection with headers
This commit is contained in:
11 files changed
+66
-2
No files matched your search
@@ -4491,10 +4491,12 @@ const {
|
||||
canCopyRowAsUpdate,
|
||||
copyAll,
|
||||
copySelectionTsv,
|
||||
copySelectionTsvWithHeaders,
|
||||
copySelectionCsv,
|
||||
copySelectionJson,
|
||||
copySelectionSqlInList,
|
||||
copySelectedRowsTsv,
|
||||
copyColumnNames,
|
||||
exportCsv,
|
||||
exportCurrentPageCsv,
|
||||
exportJson,
|
||||
@@ -6271,6 +6273,7 @@ function copySubmenu(): ContextMenuItem {
|
||||
items.push({ label: labels.update, action: copyRowAsUpdate, disabled: !canCopyPreparedUpdate() });
|
||||
}
|
||||
items.push({ label: t("grid.copyAll"), action: copyAll });
|
||||
items.push({ label: t("grid.copyColumnNames"), action: copyColumnNames });
|
||||
return { label: t("grid.copy"), icon: Copy, children: items };
|
||||
}
|
||||
|
||||
@@ -6280,6 +6283,7 @@ function selectionSubmenu(): ContextMenuItem {
|
||||
icon: SquareDashed,
|
||||
children: [
|
||||
{ label: t("grid.copySelectionTsv"), action: copySelectionTsv },
|
||||
{ label: t("grid.copySelectionTsvWithHeaders"), action: copySelectionTsvWithHeaders },
|
||||
{ label: t("grid.copySelectionCsv"), action: copySelectionCsv },
|
||||
{ label: t("grid.copySelectionJson"), action: copySelectionJson },
|
||||
{ label: t("grid.copySelectionSql"), action: copySelectionSqlInList },
|
||||
@@ -6316,6 +6320,7 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
|
||||
// 1. Copy column name
|
||||
if (contextHeaderColumn.value) {
|
||||
items.push({ label: t("grid.copyColumnName"), action: copyHeaderColumn, icon: Copy });
|
||||
items.push({ label: t("grid.copyColumnNames"), action: copyColumnNames, icon: Copy });
|
||||
items.push({
|
||||
label: t("grid.openColumnDetailsDialog"),
|
||||
action: openContextColumnDetailDialog,
|
||||
|
||||
Reference in new issue
Block a user