diff --git a/CHANGELOG.md b/CHANGELOG.md index 3352dcc3..925e3fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,13 @@ ## 1.8.2 +- bug fixes + - menu: allow manual line breaks ("`\n`") in labels / values + - widgets - html property: allow "href" attribute on "a" elements + ## 1.8.1 - bug fixes diff --git a/src/client/widgets/basics/menu-base.js b/src/client/widgets/basics/menu-base.js index 1a980668..b653982f 100644 --- a/src/client/widgets/basics/menu-base.js +++ b/src/client/widgets/basics/menu-base.js @@ -49,8 +49,9 @@ class MenuBase extends Widget { var string = this.getProp('label') === 'auto' ? '%value' : this.getProp('label'), i = this.selected + if (i > -1 && string) { - this.text.innerHTML = iconify(String(string).replace(/%value/g, JSON.stringify(this.value)).replace(/%key/g, this.keys[i])) + this.text.innerHTML = iconify(String(string).replace(/%value/g, typeof this.value === 'string' ? this.value : JSON.stringify(this.value)).replace(/%key/g, this.keys[i])) } else { this.text.innerHTML = '' } diff --git a/src/scss/widgets/basics.scss b/src/scss/widgets/basics.scss index e6132fd5..6cfbd373 100644 --- a/src/scss/widgets/basics.scss +++ b/src/scss/widgets/basics.scss @@ -280,7 +280,7 @@ .item { - + white-space: pre; z-index: 1; overflow: hidden; div {