Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanner detection event not firing #1

Open
kherP opened this issue Jun 20, 2019 · 7 comments
Open

Scanner detection event not firing #1

kherP opened this issue Jun 20, 2019 · 7 comments

Comments

@kherP
Copy link

kherP commented Jun 20, 2019

I have tried the plugin according to the documentation but the event is not firing.
Here's the reproduction link

@baao
Copy link
Owner

baao commented Jun 20, 2019

Seems like that's an issue with angular8. There might be a change with how an @Input can be set, the package is working with v7 though. I'll check later to create an update that's working with angular 8 - shouldn't be a big change. @kherP

@kherP
Copy link
Author

kherP commented Jun 20, 2019

I have tried using v7, v6 as well. All not working. I checked the condition.

this part this.checkRegex.test(this._input) always return false.

this is the checkRegex /^\d{7,14}$
this is the _input "4260182250013Enter"

Thank you so much to look into this issue

@hartjo
Copy link

hartjo commented Mar 19, 2020

any update? I am using angular 9 and no event is firing

@hartjo
Copy link

hartjo commented Mar 19, 2020

I have tried the plugin according to the documentation but the event is not firing.
Here's the reproduction link

i found out that your configuration is not correct adjust the max length cause the simulate button is over 14 char thats why it did not fire the event

@Superordi45
Copy link

Superordi45 commented Apr 8, 2020

Hello, I use an usb barcode scanner and the event didn't fire even if i change the max length config to 30 characters
the button simulateScanner didn't fire event too

the simulation Button works fine :

test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "2", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "3", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "4", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "5", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "6", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "7", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "8", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "9", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "0", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "1", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "2", code: "", location: 0, ctrlKey: false, …}
test-scanner.component.ts:26 KeyboardEvent {isTrusted: false, key: "3", code: "", location: 0, ctrlKey: false, …}```

@bartlomiejsuliga
Copy link

I think it's because the order of which fileds are initiated and checkRegex is always intiated with default config (angular/angular#34322). The easy way to fix it would be to move creating checkRegex field to ngOnInit. Could we have that fixed ?

@tahir-jamil
Copy link

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants