real-world-vue icon indicating copy to clipboard operation
real-world-vue copied to clipboard

v-on="$listeners" conflinct with @change="updateValue"

Open NatanCieplinski opened this issue 5 years ago • 2 comments

In release vuelidateP2-finish in the BaseSelect.vue v-on="$listeners" causes the same conflict that is caused in the BaseInput.vue component. However, the source code implement the solution only for the BaseInput.vue component.

Solution

Use v-on="listeners" instead of v-on="$listeners" and add

computed: {
      listeners() {
        return {
          ...this.$listeners,
          input: this.updateValue
        }
      }
    }

to your BaseSelect.vue component

NatanCieplinski avatar Mar 20 '20 02:03 NatanCieplinski

Thanks @NatanCieplinski , I got some difficulties with that one :)

vincentGuegan avatar Jun 03 '20 08:06 vincentGuegan

Thanks

garicharo avatar Jul 08 '20 17:07 garicharo