AfikDeri / v-credit-card

Beautiful credit card form component for vueJS
MIT License
62 stars 27 forks source link

change event not called #11

Closed novaknole closed 4 years ago

novaknole commented 4 years ago

Thanks for this. Looks like there might be a bug.

<VCreditCard ref="creditCard" @change="creditInfoChanged" />

methods: {
    creditInfoChanged(values) {
      console.log("good")
      for (const key in values) {
        this.cardInfo[key] = values[key];
      }

      //validate logic 
      this.validateCard = false;
    },
}

The creditInfoChanged function is never called. That's why I put ref and now using this.$refs.creditCard.form to get values when clicked submit button.

Could you look into this?

kalitk0 commented 4 years ago

I have the same issue. Have you found a solution ?

AfikDeri commented 4 years ago

I just looked into this issue, everything seams to work great. I've created a new vue-cli project, installed the v-credit-card package and using the same code as the example in the README file I was able to get this function log values on every change. Please double check your setup and make sure it's all correct. If you still have an issue, upload an example project that can reproduce this error and I'll do my best to fix it.

AfikDeri commented 4 years ago

Closing this issue, can't reproduce..