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