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 f44ccbb729
commit b43b844916
2 changed files with 3 additions and 0 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- matrix: issues when changing non-dynamic properties (content not properly removed)
- input: apply default value when receiving an empty value or no value at all
## 1.6.1

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()