From 755cb5d6f31a1e0dfdfb308632d6b22669311fa1 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 5 Dec 2021 12:55:37 +0100 Subject: [PATCH] copy json document commented (not needed) --- packages/web/src/datagrid/DataGridCore.svelte | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/web/src/datagrid/DataGridCore.svelte b/packages/web/src/datagrid/DataGridCore.svelte index 7392717e..3cdafac9 100644 --- a/packages/web/src/datagrid/DataGridCore.svelte +++ b/packages/web/src/datagrid/DataGridCore.svelte @@ -132,13 +132,13 @@ onClick: () => getCurrentDataGrid().openJsonArrayInSheet(), }); - registerCommand({ - id: 'dataGrid.copyJsonDocument', - category: 'Data grid', - name: 'Copy row as JSON document', - testEnabled: () => getCurrentDataGrid()?.copyJsonEnabled(), - onClick: () => getCurrentDataGrid().copyJsonDocument(), - }); + // registerCommand({ + // id: 'dataGrid.copyJsonDocument', + // category: 'Data grid', + // name: 'Copy row as JSON document', + // testEnabled: () => getCurrentDataGrid()?.copyJsonEnabled(), + // onClick: () => getCurrentDataGrid().copyJsonDocument(), + // }); registerCommand({ id: 'dataGrid.filterSelected', @@ -563,15 +563,15 @@ }); } - export function copyJsonEnabled() { - return isDynamicStructure && _.uniq(selectedCells.map(x => x[0])).length == 1; - } + // export function copyJsonEnabled() { + // return isDynamicStructure && _.uniq(selectedCells.map(x => x[0])).length == 1; + // } - export function copyJsonDocument() { - const rowIndex = selectedCells[0][0]; - const rowData = grider.getRowData(rowIndex); - copyTextToClipboard(JSON.stringify(rowData, undefined, 2)); - } + // export function copyJsonDocument() { + // const rowIndex = selectedCells[0][0]; + // const rowData = grider.getRowData(rowIndex); + // copyTextToClipboard(JSON.stringify(rowData, undefined, 2)); + // } export function buildFindMenu() { const res = []; @@ -1306,7 +1306,7 @@ { command: 'dataGrid.viewJsonDocument', hideDisabled: true }, { command: 'dataGrid.viewJsonValue', hideDisabled: true }, { command: 'dataGrid.openJsonArrayInSheet', hideDisabled: true }, - { command: 'dataGrid.copyJsonDocument', hideDisabled: true }, + // { command: 'dataGrid.copyJsonDocument', hideDisabled: true }, { divider: true }, { placeTag: 'export' }, { command: 'dataGrid.generateSqlFromData' },