Skip to content

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

@raju010193

Description

@raju010193
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);
  },
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions