[Vuejs]-How to update parent data after filter props in child component?

0👍

You are emitting "changed" event in the child, while listening to "change" event on the parent.

Use this:

this.$emit("change", newChangedMonth);

instead of this:

this.$emit("changed", newChangedMonth);

0👍

Listen for changed event not change

 <TodosList
          v-bind:todos="todos"
          :editedTodo="editedTodo"
          :selectedMonth="selectedMonth"
          :selectedYear="selectedYear"
          :months="months"
          :years="years"
          :json_data="json_data"
          :STORAGE_KEY="STORAGE_KEY"
          @changed="changeSelectedMonth"
        />

OR emit change event

this.$emit("change", newChangedMonth);

Leave a comment