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,669
  • 9
  • 47
  • 52
Kos-Mos
  • 415
  • 1
  • 5
  • 15

0 Answers0