1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00

Fix validation on long form field

This commit is contained in:
Andrew Kingston 2021-01-29 10:28:13 +00:00
parent af4f902e10
commit 6c6542c0c5

View file

@ -8,8 +8,17 @@
let fieldState
let fieldApi
let value
$: fieldApi?.setValue(value)
let previousValue = ""
let value = ""
$: {
// Only actually update the value when it changes, so that we don't trigger
// validation unnecessarily
if (value !== previousValue) {
fieldApi?.setValue(value)
previousValue = value
}
}
// Options for rich text component
const options = {