textarea: display nothing instead of "null" when receing no value, null or an empty string

This commit is contained in:
jean-emmanuel 2023-06-05 17:49:07 +02:00
parent bb222a11ae
commit ee98a20068
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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