From 33238de52dfadd18cae85a51bb609c9b07e5ad8a Mon Sep 17 00:00:00 2001 From: Srinath Date: Thu, 26 Feb 2026 19:22:36 +0530 Subject: [PATCH] Here Add Scanner input cleared --- src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx b/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx index 101773c..5b2202b 100644 --- a/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx +++ b/src/Pages/BookingScreen/Components/BSCombo/BSC1Search.jsx @@ -81,6 +81,7 @@ import { Global_PromoCodeOffers } from '../../../../Features/Offer/Offer.js'; import { validateOffers } from '../BSItemCards/ValidateOffer.jsx'; import { useSaleswiseOfferWatcher } from '../BSItemCards/SalesWiseOffer.jsx'; import { calculateOverAllQtyLimit } from '../../../../utils/calculations.js'; +import BarCodeScan from '../../../../Services/BarCodeScan.jsx'; const ExpireConfirmModal = lazy( () => import('../BookingFunctionality/ExpireConfirmModal.jsx') ); @@ -1137,6 +1138,9 @@ export default function BSC1Search(props) { }; ProductSelected(updatedProduct); } + // clear input after handling repeated scan + formRef.current?.resetFields(['ItemName']); + setProductList([]); return; } @@ -1164,6 +1168,9 @@ export default function BSC1Search(props) { setLastScannedQr(ApiSearchData); ProductSelected(ApiSearchData); + // clear input once a QR-based product is selected + formRef.current?.resetFields(['ItemName']); + setProductList([]); setQuickAdd(false); } else if (!ApiSearchData.ProdId && ApiSearchData?.AppId == 0) { setQuickAdd(true);