Skip to content

Commit

Permalink
Merge pull request #5257 from owncloud/do-not-use-v-model-and-input-e…
Browse files Browse the repository at this point in the history
…vent

[settings] Do not use v-model and input event for the same component
  • Loading branch information
dschmidt authored Dec 20, 2022
2 parents f44f50b + 5ccefa3 commit 9131bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<oc-select
v-model="selectedOptions"
:clearable="false"
:options="displayOptions"
:value="selectedOptions"
@input="onSelectedOption"
multiple
/>
Expand Down Expand Up @@ -37,7 +37,8 @@ export default {
}
},
methods: {
async onSelectedOption () {
async onSelectedOption (event) {
this.selectedOptions = event
const values = []
if (!isNil(this.selectedOptions)) {
this.selectedOptions.forEach(displayValue => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div>
<oc-select
v-model="selectedOption"
:clearable="false"
:options="displayOptions"
:value="selectedOption"
@input="onSelectedOption"
/>
</div>
Expand Down Expand Up @@ -38,7 +38,8 @@ export default {
}
},
methods: {
async onSelectedOption () {
async onSelectedOption (event) {
this.selectedOption = event
const values = []
if (!isNil(this.selectedOption)) {
const option = this.setting.singleChoiceValue.options.find(val => val.displayValue === this.selectedOption)
Expand Down

0 comments on commit 9131bdb

Please sign in to comment.