scholtz / qrcode-vue3

MIT License
87 stars 33 forks source link

QR code update not working #17

Open rahulkumarsingh73690 opened 2 years ago

rahulkumarsingh73690 commented 2 years ago

QR code updates when input data changes but when I change the dot type or logo QR code doesn't update. Any way to trigger qr code update ondata change

scholtz commented 1 year ago

there is demo for the update on input change: https://github.com/scholtz/qrcode-vue3-sample/blob/864df396c9099c1d0f164f09ba984faf3f8c3fa5/src/App.vue#L16

note that if you want to have this feature in vue3 you have regenerate component by adding :key

NaturalDevCR commented 11 months ago

@scholtz he meant when you change any other option as the dotsOption.

The ugly and hacky way I used to workaround this was using a v-if and a deep watcher to re-render the component when changes are detected.