Skip to content

Commit

Permalink
Merge pull request #3495 from nextcloud/backport/3490/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: Properly use input model in settings text fields
  • Loading branch information
max-nextcloud authored Feb 26, 2024
2 parents 87492b2 + 3fc0b0c commit 6ab3515
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/SettingsInputText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,17 @@
-->

<template>
<form @submit.prevent="">
<form @submit.prevent="submit">
<div class="input-wrapper">
<label :for="id">{{ label }}</label>
<input :id="id"
v-model="inputVal"
type="text"
:value="inputVal"
:disabled="disabled"
@input="$emit('input', $event.target.value)">
<input type="submit"
class="icon-confirm"
value=""
@click="$emit('update', inputVal)">
value="">
</div>
<p v-if="hint !== ''" class="hint">
{{ hint }}
Expand Down Expand Up @@ -74,13 +73,18 @@ export default {
},
watch: {
value(newVal) {
this.inputVal = this.value
this.inputVal = newVal
},
},
beforeCreate() {
this.uuid = uuid.toString()
uuid += 1
},
methods: {
submit() {
this.$emit('update', this.inputVal)
},
},
}
</script>

Expand Down

0 comments on commit 6ab3515

Please sign in to comment.