fix: getWidgetType before translate label

pull/946/head
CamilleLegeron 3 weeks ago
parent 4b1b5b4193
commit 428994ce73

@ -20,7 +20,7 @@ import {BEHAVIOR} from 'app/client/models/entities/ColumnRec';
import * as modelUtil from 'app/client/models/modelUtil';
import {removeRule, RuleOwner} from 'app/client/models/RuleOwner';
import {LinkConfig} from 'app/client/ui/selectBy';
import {getWidgetTypesLabelTranslation} from "app/client/ui/widgetTypesMap";
import {getWidgetTypes, getWidgetTypesLabelTranslation} from "app/client/ui/widgetTypesMap";
import {FilterColValues} from "app/common/ActiveDocAPI";
import {AccessLevel, ICustomWidget} from 'app/common/CustomWidget';
import {UserAction} from 'app/common/DocActions';
@ -461,7 +461,7 @@ export function createViewSectionRec(this: ViewSectionRec, docModel: DocModel):
// All concatenated separated by space.
this.defaultWidgetTitle = this.autoDispose(ko.pureComputed(() => {
const widgetTypeDesc = this.parentKey() !== 'record'
? `${getWidgetTypesLabelTranslation(this.parentKey.peek() as any)}`
? `${getWidgetTypesLabelTranslation(getWidgetTypes(this.parentKey.peek() as any))}`
: '';
const table = this.table();
return [

Loading…
Cancel
Save