mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
copy json document commented (not needed)
This commit is contained in:
parent
b4e777018e
commit
755cb5d6f3
@ -132,13 +132,13 @@
|
|||||||
onClick: () => getCurrentDataGrid().openJsonArrayInSheet(),
|
onClick: () => getCurrentDataGrid().openJsonArrayInSheet(),
|
||||||
});
|
});
|
||||||
|
|
||||||
registerCommand({
|
// registerCommand({
|
||||||
id: 'dataGrid.copyJsonDocument',
|
// id: 'dataGrid.copyJsonDocument',
|
||||||
category: 'Data grid',
|
// category: 'Data grid',
|
||||||
name: 'Copy row as JSON document',
|
// name: 'Copy row as JSON document',
|
||||||
testEnabled: () => getCurrentDataGrid()?.copyJsonEnabled(),
|
// testEnabled: () => getCurrentDataGrid()?.copyJsonEnabled(),
|
||||||
onClick: () => getCurrentDataGrid().copyJsonDocument(),
|
// onClick: () => getCurrentDataGrid().copyJsonDocument(),
|
||||||
});
|
// });
|
||||||
|
|
||||||
registerCommand({
|
registerCommand({
|
||||||
id: 'dataGrid.filterSelected',
|
id: 'dataGrid.filterSelected',
|
||||||
@ -563,15 +563,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function copyJsonEnabled() {
|
// export function copyJsonEnabled() {
|
||||||
return isDynamicStructure && _.uniq(selectedCells.map(x => x[0])).length == 1;
|
// return isDynamicStructure && _.uniq(selectedCells.map(x => x[0])).length == 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
export function copyJsonDocument() {
|
// export function copyJsonDocument() {
|
||||||
const rowIndex = selectedCells[0][0];
|
// const rowIndex = selectedCells[0][0];
|
||||||
const rowData = grider.getRowData(rowIndex);
|
// const rowData = grider.getRowData(rowIndex);
|
||||||
copyTextToClipboard(JSON.stringify(rowData, undefined, 2));
|
// copyTextToClipboard(JSON.stringify(rowData, undefined, 2));
|
||||||
}
|
// }
|
||||||
|
|
||||||
export function buildFindMenu() {
|
export function buildFindMenu() {
|
||||||
const res = [];
|
const res = [];
|
||||||
@ -1306,7 +1306,7 @@
|
|||||||
{ command: 'dataGrid.viewJsonDocument', hideDisabled: true },
|
{ command: 'dataGrid.viewJsonDocument', hideDisabled: true },
|
||||||
{ command: 'dataGrid.viewJsonValue', hideDisabled: true },
|
{ command: 'dataGrid.viewJsonValue', hideDisabled: true },
|
||||||
{ command: 'dataGrid.openJsonArrayInSheet', hideDisabled: true },
|
{ command: 'dataGrid.openJsonArrayInSheet', hideDisabled: true },
|
||||||
{ command: 'dataGrid.copyJsonDocument', hideDisabled: true },
|
// { command: 'dataGrid.copyJsonDocument', hideDisabled: true },
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
{ placeTag: 'export' },
|
{ placeTag: 'export' },
|
||||||
{ command: 'dataGrid.generateSqlFromData' },
|
{ command: 'dataGrid.generateSqlFromData' },
|
||||||
|
Loading…
Reference in New Issue
Block a user