diff --git a/client/src/components/fields/FieldOverlay.tsx b/client/src/components/fields/FieldOverlay.tsx index 18f14d2..857ffc1 100644 --- a/client/src/components/fields/FieldOverlay.tsx +++ b/client/src/components/fields/FieldOverlay.tsx @@ -12,6 +12,8 @@ export interface FieldOverlayProps { minWidth?: number | string; /** Максимальная высота оверлея. */ maxHeight?: number | string; + /** Ширина оверлея. */ + width?: number | string; } export function FieldOverlay({ @@ -21,6 +23,7 @@ export function FieldOverlay({ fitContainer = true, minWidth, maxHeight, + width, }: FieldOverlayProps) { const [mounted, setMounted] = useState(false); @@ -34,11 +37,12 @@ export function FieldOverlay({ const style: React.CSSProperties = {}; if (minWidth !== undefined) style.minWidth = typeof minWidth === 'number' ? `${minWidth}px` : minWidth; if (maxHeight !== undefined) style.maxHeight = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight; + if (width !== undefined) style.width = typeof width === 'number' ? `${width}px` : width; return createPortal(
{editor} diff --git a/client/src/pages/TaskDetail.tsx b/client/src/pages/TaskDetail.tsx index 6c53dfc..a6e2783 100644 --- a/client/src/pages/TaskDetail.tsx +++ b/client/src/pages/TaskDetail.tsx @@ -986,9 +986,9 @@ function FieldValueRow({ if (field.type === 'textarea' || field.type === 'rich-text') { return ( onDraftChange?.(e.target.value)} onClick={e => e.stopPropagation()} @@ -1301,9 +1301,10 @@ function FieldValueRow({ onEnterEdit={handleEnterEdit} fitOverlay={field.type !== 'textarea' && field.type !== 'rich-text'} overlayClassName={field.type === 'textarea' || field.type === 'rich-text' ? 'flex flex-col overflow-hidden' : ''} - overlayMaxHeight={field.type === 'textarea' || field.type === 'rich-text' ? 320 : undefined} - overlayMinWidth={field.type === 'textarea' || field.type === 'rich-text' ? 300 : 180} - className={field.type === 'textarea' || field.type === 'rich-text' ? 'items-start min-h-[24px]' : 'items-center min-h-[28px]'} + overlayMaxHeight={field.type === 'textarea' || field.type === 'rich-text' ? 'min(70vh, 500px)' : undefined} + overlayMinWidth={field.type === 'textarea' || field.type === 'rich-text' ? '100%' : 180} + 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]'} /> ) : readViewNode; })()}