diff --git a/lightrag_webui/src/components/graph/PropertyEditDialog.tsx b/lightrag_webui/src/components/graph/PropertyEditDialog.tsx index 4db32fbe..ffff0b8a 100644 --- a/lightrag_webui/src/components/graph/PropertyEditDialog.tsx +++ b/lightrag_webui/src/components/graph/PropertyEditDialog.tsx @@ -48,6 +48,40 @@ const PropertyEditDialog = ({ return translation === translationKey ? name : translation } + // Get textarea configuration based on property name + const getTextareaConfig = (propertyName: string) => { + switch (propertyName) { + case 'description': + return { + // No rows attribute for description to allow auto-sizing + className: 'max-h-[50vh] min-h-[10em] resize-y', // Maximum height 70% of viewport, minimum height ~20 lines, allow vertical resizing + style: { + height: '70vh', // Set initial height to 70% of viewport + minHeight: '20em', // Minimum height ~20 lines + resize: 'vertical' as const // Allow vertical resizing, using 'as const' to fix type + } + }; + case 'entity_id': + return { + rows: 2, + className: '', + style: {} + }; + case 'keywords': + return { + rows: 4, + className: '', + style: {} + }; + default: + return { + rows: 5, + className: '', + style: {} + }; + } + }; + const handleSave = () => { if (value.trim() !== '') { onSave(value) @@ -71,13 +105,26 @@ const PropertyEditDialog = ({ {/* Multi-line text input using textarea */}
-