Display table name instead of table Ids on select column reference (#353)

This commit is contained in:
Louis Delbosc 2022-11-17 16:06:53 +01:00 committed by GitHub
parent 51d61fc743
commit 619cd91dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,9 +336,9 @@ export class FieldBuilder extends Disposable {
// Builds the reference type table selector. Built when the column is type reference.
public _buildRefTableSelect() {
const allTables = Computed.create(null, (use) =>
use(this._docModel.visibleTableIds.getObservable()).map(tableId => ({
value: tableId,
label: tableId,
use(this._docModel.visibleTables.getObservable()).map(tableRec => ({
value: use(tableRec.tableId),
label: use(tableRec.tableNameDef),
icon: 'FieldTable' as const
}))
);