diff --git a/CHANGELOG.md b/CHANGELOG.md index fafe1d87..d3851f15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/client/widgets/basics/textarea.js b/src/client/widgets/basics/textarea.js index c3c9dc23..08477db0 100644 --- a/src/client/widgets/basics/textarea.js +++ b/src/client/widgets/basics/textarea.js @@ -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