Client - handle when input is null in custom texteara - fix #237

This commit is contained in:
Sam 2022-09-18 15:23:24 +02:00
parent 728007024f
commit 7571bcc7ea

View File

@ -21,7 +21,7 @@
name: string
charLimit?: number
disabled?: boolean
input?: string
input?: string | null
}
const props = withDefaults(defineProps<Props>(), {
charLimit: 500,
@ -40,7 +40,7 @@
watch(
() => props.input,
(value) => {
text.value = value
text.value = value === null ? '' : value
}
)
</script>