From 25929fbd26fda0d04c57b436e3079bd2b2b5604a Mon Sep 17 00:00:00 2001 From: Tim Schug Date: Wed, 29 May 2024 00:27:34 -0400 Subject: [PATCH] Made single scan reactive Added the reactivity for single barcode scan. --- .../main/default/lwc/barcodeScanner/barcodeScanner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow_screen_components/barcodeScanner/force-app/main/default/lwc/barcodeScanner/barcodeScanner.js b/flow_screen_components/barcodeScanner/force-app/main/default/lwc/barcodeScanner/barcodeScanner.js index e1f8b284f..4026a160d 100644 --- a/flow_screen_components/barcodeScanner/force-app/main/default/lwc/barcodeScanner/barcodeScanner.js +++ b/flow_screen_components/barcodeScanner/force-app/main/default/lwc/barcodeScanner/barcodeScanner.js @@ -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'; @@ -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)); });