hints in references columns

This commit is contained in:
Jan Prochazka 2021-01-23 18:52:24 +01:00
parent e4ad9acb68
commit a23c882473
2 changed files with 3 additions and 1 deletions

View File

@ -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[]) {

View File

@ -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;