textarea: display nothing instead of "null" when receing no value, null or an empty string
This commit is contained in:
parent
bb222a11ae
commit
ee98a20068
2 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
- bug fixes
|
||||
- regression in inter-widget sync mechanism
|
||||
- regression breaking `set()` function in scripts
|
||||
- textarea: display nothing instead of "null" when receing no value, null or an empty string
|
||||
|
||||
## 1.25.0
|
||||
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@ class TextArea extends Widget {
|
|||
|
||||
setValue(v, options={} ) {
|
||||
|
||||
this.value = String(v)
|
||||
this.value = v === '' || v === null ? this.getProp('default') : String(v)
|
||||
|
||||
if (this.value === '' || this.value === null) this.value = this.getProp('default')
|
||||
if (this.value === '') this.value = this.getProp('default')
|
||||
|
||||
if (this.input.value !== this.value) this.input.value = this.value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue