fix(ui): блочные редакторы geo/contact в потоке вместо строгого оверлея

- в режиме редактирования карточки задачи редакторы geo (~90px) и contact
  (~300px) переполняли inset-0 оверлей поверх однострочного read-view (~28px)
  и наезжали на соседние поля (форма «Объект», «Наши Юрики»)
- теперь для типов geo/contact редактор рендерится в потоке, строка растёт
  до высоты редактора; остальные типы — без изменений
This commit is contained in:
2026-07-18 11:55:32 +03:00
parent 8b607e7156
commit 219c7a6203

View File

@@ -1306,7 +1306,14 @@ function FieldValueRow({
const isContractNumberField = field.type === 'contract-number'; const isContractNumberField = field.type === 'contract-number';
const isDateWithProlongation = (field.type === 'date' || field.type === 'datetime') && field.autoProlongation; const isDateWithProlongation = (field.type === 'date' || field.type === 'datetime') && field.autoProlongation;
const needsWideOverlay = isContractNumberField || isDateWithProlongation; const needsWideOverlay = isContractNumberField || isDateWithProlongation;
return canShowInlineEditor ? ( // Блочные редакторы (geo ~90px, contact ~300px) не помещаются в строгий
// inset-0 оверлей поверх однострочного read-view: контент переполняет
// рамку и наезжает на соседние поля. Рендерим их в потоке — строка
// растёт до высоты редактора вместо наложения.
const isBlockEditor = field.type === 'geo' || field.type === 'contact';
if (!canShowInlineEditor) return readViewNode;
if (isBlockEditor) return editorNode;
return (
<InlineField <InlineField
readView={readViewNode} readView={readViewNode}
editor={editorNode} editor={editorNode}
@@ -1334,7 +1341,7 @@ function FieldValueRow({
overlayWidth={field.type === 'textarea' || field.type === 'rich-text' ? '100%' : undefined} overlayWidth={field.type === 'textarea' || field.type === 'rich-text' ? '100%' : undefined}
className={field.type === 'textarea' || field.type === 'rich-text' ? 'items-start min-h-[24px] w-full' : 'items-center min-h-[28px]'} className={field.type === 'textarea' || field.type === 'rich-text' ? 'items-start min-h-[24px] w-full' : 'items-center min-h-[28px]'}
/> />
) : readViewNode; );
})()} })()}
</div> </div>
{isFieldPending && !isGlobalEditMode && ( {isFieldPending && !isGlobalEditMode && (