From 06414d344b151ad6e1a3225a9f5f1f76d58d319c Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 1 Apr 2025 12:08:46 +0200 Subject: [PATCH] feat(Textarea): add `autoresize-delay` prop Resolves #3730 --- src/runtime/components/Textarea.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runtime/components/Textarea.vue b/src/runtime/components/Textarea.vue index 403de843..9bc30e61 100644 --- a/src/runtime/components/Textarea.vue +++ b/src/runtime/components/Textarea.vue @@ -39,11 +39,12 @@ export interface TextareaProps extends UseComponentIconsProps { required?: boolean autofocus?: boolean autofocusDelay?: number + autoresize?: boolean + autoresizeDelay?: number disabled?: boolean class?: any rows?: number maxrows?: number - autoresize?: boolean /** Highlight the ring color like a focus state. */ highlight?: boolean ui?: PartialString @@ -74,7 +75,8 @@ defineOptions({ inheritAttrs: false }) const props = withDefaults(defineProps(), { rows: 3, maxrows: 0, - autofocusDelay: 0 + autofocusDelay: 0, + autoresizeDelay: 0 }) const slots = defineSlots() const emits = defineEmits() @@ -182,7 +184,7 @@ onMounted(() => { setTimeout(() => { autoResize() - }, 100) + }, props.autoresizeDelay) }) defineExpose({