From e9b432bec64071158b3bf401192591b713309527 Mon Sep 17 00:00:00 2001 From: BOHA Date: Fri, 12 Jun 2026 08:16:43 +0200 Subject: [PATCH] feat(documents): autosize item descriptions (minRows 2, maxRows 16) The 'Podrobny popis' textareas in the shared items editor and the invoice page now grow with content like the rich-text editor (fixed rows={2} -> minRows/maxRows autosize), capped at 16 rows; the manual vertical resize handle stays. Co-Authored-By: Claude Fable 5 --- src/admin/components/document/DocumentItemsEditor.tsx | 6 ++++-- src/admin/pages/InvoiceDetail.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/admin/components/document/DocumentItemsEditor.tsx b/src/admin/components/document/DocumentItemsEditor.tsx index 78d05c8..40225d9 100644 --- a/src/admin/components/document/DocumentItemsEditor.tsx +++ b/src/admin/components/document/DocumentItemsEditor.tsx @@ -214,7 +214,8 @@ function SortableItemRow({ placeholder="Volitelný" InputProps={{ readOnly }} multiline - rows={2} + minRows={2} + maxRows={16} slotProps={{ htmlInput: { maxLength: itemDescriptionMaxLength } }} sx={{ "& textarea": { resize: "vertical" } }} /> @@ -352,7 +353,8 @@ function SortableItemRow({ placeholder="Podrobný popis (volitelný)" InputProps={{ readOnly }} multiline - rows={2} + minRows={2} + maxRows={16} slotProps={{ htmlInput: { maxLength: itemDescriptionMaxLength } }} sx={{ "& textarea": { diff --git a/src/admin/pages/InvoiceDetail.tsx b/src/admin/pages/InvoiceDetail.tsx index 6656079..7ef2c2a 100644 --- a/src/admin/pages/InvoiceDetail.tsx +++ b/src/admin/pages/InvoiceDetail.tsx @@ -317,7 +317,8 @@ function SortableInvoiceRow({ onChange={(e) => onUpdate(index, "item_description", e.target.value)} placeholder="Volitelný" multiline - rows={2} + minRows={2} + maxRows={16} sx={{ "& textarea": { resize: "vertical" } }} />