1

queryString is a property bound to an input with v-model.

I have a component that listens to an event-bus and should override queryString property value. While I can successfully receive and print the result variable, for some reason queryString value isn't updated. Am I doing something wrong?

export default {
  data() {
    return {
      queryString: '',
    }
  },

  mounted(){
    this.$nuxt.$on("result-selected", function(result){
      console.log("the result " + result)
      this.queryString = result
    })
  },
}
gre_gor
  • 6,115
  • 9
  • 39
  • 46
Kos-Mos
  • 135
  • 7

0 Answers0