Skip to content

Commit

Permalink
Merge pull request #1828 from nextcloud/fix/placeholder
Browse files Browse the repository at this point in the history
Fix placeholder display
  • Loading branch information
skjnldsv authored Oct 8, 2020
2 parents 987c206 + dacd518 commit 67b6548
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Properties/PropertyText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
:class="{'property__value--with-ext': haveExtHandler}"
type="text"
class="property__value"
:placeholder="localType.placeholder"
:placeholder="placeholder"
@input="updateValue">

<!-- external link -->
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 67b6548

Please sign in to comment.