input: apply default value when receiving an empty value or no value at all

This commit is contained in:
bordun 2020-11-07 11:23:29 +01:00
parent fed7f9b062
commit 84fa02176d
2 changed files with 3 additions and 0 deletions

View file

@ -126,6 +126,8 @@ class Input extends Canvas {
this.value = v
}
if (this.value === '' || this.value === null) this.value = this.getProp('default')
this.stringValue = this.getStringValue()
this.batchDraw()