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

onscan configured success but i trying to call inside function for getting product details but this.onChangeBardCode(); is not able to access #37

Open
raju010193 opened this issue Jul 1, 2022 · 1 comment

Comments

@raju010193
Copy link

onScan.attachTo(document, {
  suffixKeyCodes: [13], // enter-key expected at the end of a scan
  reactToPaste: true, // Compatibility to built-in scanners in paste-mode (as opposed to keyboard-mode)
  onScan: function (sCode, iQty) { // Alternative to document.addEventListener('scan')
    console.log('Scanned: ' + iQty + 'x ' + sCode);
    if(sCode!=undefined){
      this.itemInfoFg.controls.barCode.patchValue(sCode);
      this.onChangeBardCode();
      
    }
    
  },
  onKeyDetect: function (iKeyCode) { // output all potentially relevant key events - great for debugging!
    console.log('Pressed: ' + iKeyCode);
  },
});
@d0niek
Copy link

d0niek commented Nov 20, 2022

Hi @raju010193
Maybe this is an object onScan not yours object? Try with other reference to your object? If it's not help I don't know what other can fix it.

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

2 participants