fix(editor): Fix event emit on credential sharing (#6922)

Fix event emit
This commit is contained in:
Iván Ovejero 2023-08-14 13:32:23 +02:00 committed by GitHub
parent a82107fb05
commit 297c3c91f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -87,7 +87,7 @@
:credentialId="credentialId"
:credentialPermissions="credentialPermissions"
:modalBus="modalBus"
@change="onChangeSharedWith"
@update:modelValue="onChangeSharedWith"
/>
</div>
<div v-else-if="activeTab === 'details' && credentialType" :class="$style.mainContent">

View file

@ -147,7 +147,7 @@ export default defineComponent({
methods: {
async onAddSharee(userId: string) {
const sharee = { ...this.usersStore.getUserById(userId), isOwner: false };
this.$emit('change', (this.credentialData.sharedWith || []).concat(sharee));
this.$emit('update:modelValue', (this.credentialData.sharedWith || []).concat(sharee));
},
async onRemoveSharee(userId: string) {
const user = this.usersStore.getUserById(userId);
@ -170,7 +170,7 @@ export default defineComponent({
if (confirm === MODAL_CONFIRM) {
this.$emit(
'change',
'update:modelValue',
this.credentialData.sharedWith.filter((sharee: IUser) => {
return sharee.id !== user.id;
}),