'Vue cunstom event with parameter returns undefined

I have parent and component in Vue application. Childe componentt needs to emit custom event to the parent and send him some parameter. Child looks like

<b-button
    v-if="type === 'removed' && campaign && !campaign.authorized"
    class="is-fullwidth"
    type="is-primary"
    :loading="deleteBtnLoading"
    @click="updateDeleted($event, false)"
    >{{
        click
    }}</b-button
>

updateDeleted(e, save = false) {
    console.log(e);  // This works
    console.log(save);  // This works
    this.$emit('updateDeleted', save);
}

The parent component is not able to catch save value. The code looks like

<DraftChangedModal
    type="removed"
    :devices="removedModalDevices"
    :campaign="campaign"
    :user="user"
    @updateDeleted="updateDraftDeleted(save)"
/>

async updateDraftDeleted(e, save) {
    console.log(e);  // undefined
    console.log(save);  // undefined
},

What am I doing wrong? Thanks for any help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source