[Vuejs]-Vue $emit not works properly on dynamic component /promise

0👍

Try setting the prop for that emit like this:

<dynamic-table
  :table-heads="tableHeads"
  :table-rows="tableRows"
  @update-loading-status="updateLoadingStatus"
  :is-loading="isLoading">

And calling that emit like this (although it should work as you have it):

this.$emit('update-loading-status', true)

Also you can define them in a general way and use them in the component you want:
https://v2.vuejs.org/v2/guide/custom-directive.html

Leave a comment