summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-10-08 09:15:20 +0200
committerGitHub <noreply@github.com>2020-10-08 09:15:20 +0200
commit67b654881f4b2e62a2a4eb6ad3b5e5acce4fbc00 (patch)
tree69fe9aebd469a54c6e9a598a45f58651117836f5
parent987c206a8d3a565cb8afab0bbedb0484828cde5d (diff)
parentdacd518b633e32113d7c5879cc8195d01cb8b6d3 (diff)
Merge pull request #1828 from nextcloud/fix/placeholder
Fix placeholder display
-rw-r--r--src/components/Properties/PropertyText.vue14
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() {