vue-barcode-scanner
vue-barcode-scanner copied to clipboard
[Feature request] Before & After event
Thank for made this plugin it's easy to use and save me a lot of time, and I would like to request some features:
- Before event: fire before barcode start scanning
- After event: fire after barcode finished scanning
Thank again, these are my requests please let me know what you think about it
I'ts a greeat idea, I'll find some time to improve this but, I't always welcome for any PR.
Great idea. I have issue when user focus on an input and scan barcodes. I want to blur all focused inputs.
I have fixed my issue with this
`
const eventBus = this.$barcodeScanner.init((barcode) => {
this.searchByBarcode(barcode)
}, {
eventBus: true,
})
if (eventBus) {
eventBus.$on('start', (e) => {
if (e.target.tagName.toUpperCase() == 'INPUT') {
e.target.blur()
}
})
}
`
The code above worked well, but another issue happened, which blur first keypress on inputs.