mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 11:23:59 +00:00
form view - expand column by keyboard plus
This commit is contained in:
@@ -288,8 +288,8 @@ export abstract class GridDisplay {
|
|||||||
return this.config.expandedColumns.includes(uniqueName);
|
return this.config.expandedColumns.includes(uniqueName);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleExpandedColumn(uniqueName: string) {
|
toggleExpandedColumn(uniqueName: string, value?: boolean) {
|
||||||
this.includeInColumnSet('expandedColumns', uniqueName, !this.isExpandedColumn(uniqueName));
|
this.includeInColumnSet('expandedColumns', uniqueName, value == null ? !this.isExpandedColumn(uniqueName) : value);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFilter(uniqueName: string) {
|
getFilter(uniqueName: string) {
|
||||||
|
|||||||
@@ -265,8 +265,8 @@ export class TableFormViewDisplay extends FormViewDisplay {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleExpandedColumn(uniqueName: string) {
|
toggleExpandedColumn(uniqueName: string, value?: boolean) {
|
||||||
this.gridDisplay.toggleExpandedColumn(uniqueName);
|
this.gridDisplay.toggleExpandedColumn(uniqueName, value);
|
||||||
this.gridDisplay.reload();
|
this.gridDisplay.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,6 +406,20 @@
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.keyCode == keycodes.numPadAdd) {
|
||||||
|
const col = getCellColumn(currentCell);
|
||||||
|
if (col.foreignKey) {
|
||||||
|
formDisplay.toggleExpandedColumn(col.uniqueName, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.keyCode == keycodes.numPadSub) {
|
||||||
|
const col = getCellColumn(currentCell);
|
||||||
|
if (col.foreignKey) {
|
||||||
|
formDisplay.toggleExpandedColumn(col.uniqueName, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (event.keyCode == keycodes.f2) {
|
if (event.keyCode == keycodes.f2) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true });
|
dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true });
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ export default {
|
|||||||
numPad7: 103,
|
numPad7: 103,
|
||||||
numPad8: 104,
|
numPad8: 104,
|
||||||
numPad9: 105,
|
numPad9: 105,
|
||||||
|
numPadAdd: 107,
|
||||||
|
numPadSub: 109,
|
||||||
multiply: 106,
|
multiply: 106,
|
||||||
add: 107,
|
add: 107,
|
||||||
subtract: 109,
|
subtract: 109,
|
||||||
|
|||||||
Reference in New Issue
Block a user