Greetings from my VueJS Table component!
<b-table
class="table table-striped"
id="my-table"
:items="items"
:per-page="perPage"
:current-page="currentPage"
:fields="fields"
@row-clicked="test"
lg
></b-table>
Here's the method within the same component:
methods: {
test(){
console.log('testing')
this.$emit('rowClickedEvent',"heyoooooooo")
}
},
Now, let's take a look at the parent component:
<ClientTable :fields="fields" :items="rows" :sortBy="sortBy" :sortDesc="sortDesc" @rowClickedEvent="Callme()"/>
And here is the method in the parent component:
methods: {
Callme(e){
console.log('hee')
}
},
I'm new to VueJS and I am having trouble with using Emit. My code doesn't seem to be working as expected, as it does not log anything to the console.
Thank you in advance for any help!