Fix double emit of input event from c-input-select
This commit is contained in:
parent
0bfd230395
commit
c7f13a1752
@ -9,7 +9,6 @@
|
||||
:get-option-key="r => r.value"
|
||||
:get-option-label="r => getRoleLabel(r)"
|
||||
:placeholder="$t('admin:picker.role.placeholder')"
|
||||
multiple
|
||||
@search="search"
|
||||
@input="updateValue($event)"
|
||||
/>
|
||||
@ -120,19 +119,13 @@ export default {
|
||||
this.preload()
|
||||
}, 300),
|
||||
|
||||
updateValue (role, index = -1) {
|
||||
updateValue (role) {
|
||||
// reset picker value for better value presentation
|
||||
if (this.$refs.picker) {
|
||||
this.$refs.picker._data._value = undefined
|
||||
}
|
||||
|
||||
if (role[0]) {
|
||||
this.addRole(role[0])
|
||||
} else {
|
||||
if (index >= 0) {
|
||||
this.value.splice(index, 1)
|
||||
}
|
||||
}
|
||||
this.addRole(role)
|
||||
},
|
||||
|
||||
getRoleLabel ({ name, handle, roleID }) {
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
:get-option-key="u => u.value"
|
||||
:get-option-label="u => getUserLabel(u)"
|
||||
:placeholder="$t('admin:picker.member.placeholder')"
|
||||
multiple
|
||||
@search="search"
|
||||
@input="updateValue($event)"
|
||||
/>
|
||||
@ -182,19 +181,13 @@ export default {
|
||||
this.fetchUsers()
|
||||
}, 300),
|
||||
|
||||
updateValue (user, index = -1) {
|
||||
updateValue (user) {
|
||||
// reset picker value for better value presentation
|
||||
if (this.$refs.picker) {
|
||||
this.$refs.picker._data._value = undefined
|
||||
}
|
||||
|
||||
if (user[0]) {
|
||||
this.addMember(user[0])
|
||||
} else {
|
||||
if (index >= 0) {
|
||||
this.value.splice(index, 1)
|
||||
}
|
||||
}
|
||||
this.addMember(user)
|
||||
},
|
||||
|
||||
getUserLabel ({ label, name, handle, username, email }) {
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
label="text"
|
||||
:reduce="modifier => modifier.value"
|
||||
:placeholder="$t('edit.dimension.function.placeholder')"
|
||||
@change="onDimModifierChange($event, d)"
|
||||
@input="onDimModifierChange($event, d)"
|
||||
/>
|
||||
</b-form-group>
|
||||
</b-col>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
:placeholder="$t('pickNamespace')"
|
||||
:autoscroll="false"
|
||||
:append-to-body="false"
|
||||
@option:selected="namespaceSelected"
|
||||
@input="namespaceSelected"
|
||||
>
|
||||
<template #list-header>
|
||||
<li
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
v-model="block.style.variants.headerText"
|
||||
:options="textVariants"
|
||||
:reduce="o => o.value"
|
||||
:placeholder="$t('general.label.none')"
|
||||
label="text"
|
||||
/>
|
||||
</b-form-group>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
:append-to-body="appendToBody"
|
||||
class="bg-white rounded"
|
||||
:class="sizeClass"
|
||||
v-on="$listeners"
|
||||
@search="($event) => $emit('search', $event)"
|
||||
>
|
||||
<template
|
||||
v-for="(_, name) in $scopedSlots"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user