i'm trying to emit function with parameters like that.
template: `
<div class="searchDropDown">
<div class="dropdown is-active">
<div class="dropdown-trigger">
<button class="button" aria-haspopup="true" aria-controls="dropdown-menu">
<span>{{selectedItem}}</span>
</button>
</div>
<div class="dropdown-menu" id="dropdown-menu" role="menu">
<div class="dropdown-content">
<a class="dropdown-item" v-for="item in drop" @click="$emit('select-menu-item($event)')">
{{item.name}}
</a>
</div>
</div>
</div>
</div>
`
here is the i'm trying to pass item to method like a parameter.
here is my component which i try to emit function:
<search-component v-bind="searchProps" @select-menu-item="selectedITem($event)"></search-component>
and here is my method:
selectedITem(arg1) {
console.log("cl")
console.log(arg1)
}
here is if i'm not trying to pass parameter everything well work so my method selectedITem is working. When i try to pass parameter like that nothing happened and i'm not getting some error.