Skip to content

Commit

Permalink
Merge pull request #1543 from tschug/patch-1
Browse files Browse the repository at this point in the history
Made single scan reactive
  • Loading branch information
alexed1 authored Jun 16, 2024
2 parents 2b93e0b + 25929fb commit d5cafff
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**/
// barcodeScanner.js
import { LightningElement,api } from 'lwc';
import { FlowNavigationNextEvent } from 'lightning/flowSupport';
import { FlowNavigationNextEvent, FlowAttributeChangeEvent } from 'lightning/flowSupport';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { getBarcodeScanner } from 'lightning/mobileCapabilities';

Expand Down Expand Up @@ -165,6 +165,7 @@ export default class BarcodeScanner extends LightningElement {
// Clean up by ending capture,
// whether we completed successfully or had an error
this.myScanner.endCapture();
this.dispatchEvent(new FlowAttributeChangeEvent('scannedBarcode',this.scannedBarcode));
});


Expand Down

0 comments on commit d5cafff

Please sign in to comment.