diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-10-07 08:44:21 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-10-07 08:44:21 +0200 |
commit | dacd518b633e32113d7c5879cc8195d01cb8b6d3 (patch) | |
tree | f9747645ceb0ba21a146c2f3d6f84e59023bb562 | |
parent | 604e1b1d2ea317c3e3b46fcee8aad8ba9fe82cec (diff) |
Fix placeholder display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | src/components/Properties/PropertyText.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/Properties/PropertyText.vue b/src/components/Properties/PropertyText.vue index f1273a05..2a6efe2c 100644 --- a/src/components/Properties/PropertyText.vue +++ b/src/components/Properties/PropertyText.vue @@ -72,7 +72,7 @@ :class="{'property__value--with-ext': haveExtHandler}" type="text" class="property__value" - :placeholder="localType.placeholder" + :placeholder="placeholder" @input="updateValue"> <!-- external link --> @@ -158,6 +158,18 @@ export default { haveExtHandler() { return this.externalHandler.trim() !== '' && this.localValue && this.localValue.length > 0 }, + + /** + * Return the selected type placeholder if any + * or the propModel default placeholder + * @returns {string} + */ + placeholder() { + if (this.localType?.placeholder) { + return this.localType.placeholder + } + return this.propModel.placeholder + }, }, mounted() { |