fix: шаблон названия резолвит массив id справочника в отображаемые значения
This commit is contained in:
@@ -402,6 +402,13 @@ export function formatFieldValueForTitle(val: any, fieldType?: string, ctx?: Fie
|
||||
if (typeof val === 'string') {
|
||||
try { parsedVal = JSON.parse(val); } catch { parsedVal = val; }
|
||||
}
|
||||
// Handle array (multi-select)
|
||||
if (Array.isArray(parsedVal)) {
|
||||
return parsedVal
|
||||
.map((v) => formatFieldValueForTitle(v, fieldType, ctx, fieldOptions))
|
||||
.filter(Boolean)
|
||||
.join(', ');
|
||||
}
|
||||
// Try to resolve via tableRowMap first
|
||||
if (ctx?.tableRowMap && fieldOptions) {
|
||||
const parsedOpts = safeParseOptions(fieldOptions);
|
||||
|
||||
Reference in New Issue
Block a user