mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
hints in references columns
This commit is contained in:
parent
e4ad9acb68
commit
a23c882473
@ -38,6 +38,7 @@ export class TableFormViewDisplay extends FormViewDisplay {
|
|||||||
this.columns = [];
|
this.columns = [];
|
||||||
this.addDisplayColumns(this.gridDisplay.columns);
|
this.addDisplayColumns(this.gridDisplay.columns);
|
||||||
this.baseTable = this.gridDisplay.baseTable;
|
this.baseTable = this.gridDisplay.baseTable;
|
||||||
|
this.gridDisplay.hintBaseColumns = this.columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
addDisplayColumns(columns: DisplayColumn[]) {
|
addDisplayColumns(columns: DisplayColumn[]) {
|
||||||
|
@ -8,6 +8,7 @@ import { filterName } from './filterName';
|
|||||||
export class TableGridDisplay extends GridDisplay {
|
export class TableGridDisplay extends GridDisplay {
|
||||||
public table: TableInfo;
|
public table: TableInfo;
|
||||||
public addAllExpandedColumnsToSelected = false;
|
public addAllExpandedColumnsToSelected = false;
|
||||||
|
public hintBaseColumns: DisplayColumn[];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public tableName: NamedObjectInfo,
|
public tableName: NamedObjectInfo,
|
||||||
@ -114,7 +115,7 @@ export class TableGridDisplay extends GridDisplay {
|
|||||||
addHintsToSelect(select: Select): boolean {
|
addHintsToSelect(select: Select): boolean {
|
||||||
let res = false;
|
let res = false;
|
||||||
const groupColumns = this.groupColumns;
|
const groupColumns = this.groupColumns;
|
||||||
for (const column of this.getGridColumns()) {
|
for (const column of this.hintBaseColumns || this.getGridColumns()) {
|
||||||
if (column.foreignKey) {
|
if (column.foreignKey) {
|
||||||
if (groupColumns && !groupColumns.includes(column.uniqueName)) {
|
if (groupColumns && !groupColumns.includes(column.uniqueName)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user