From ba013fc415441457b3a0b508c8f365fce21baa63 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Feb 2026 17:44:13 +0530 Subject: [PATCH] direct sale fix --- .../BookingScreen/Forms/DirectSale/DirectSale.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx b/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx index 98150fc..10ac37b 100644 --- a/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx +++ b/src/Pages/BookingScreen/Forms/DirectSale/DirectSale.jsx @@ -84,6 +84,13 @@ const DirectSale = ({ UomData = [], TaxData = [], ProductTypeData = [], ProdCatD const handleDelete = async (record) => { if (record?.prodId) { + if (searchText != null && searchText !== '') { + setSearchText('') + setCurrentPage(1); + if (searchInputRef.current) { + searchInputRef.current.value = ''; + } + } const deleteData = { ProdId: record.prodId, ActiveStatus: record.activeStatus === 'A' ? 'D' : 'A', @@ -814,7 +821,10 @@ const DirectSale = ({ UomData = [], TaxData = [], ProductTypeData = [], ProdCatD ref={searchInputRef} type="text" placeholder="Search Product / Short Code..." - onChange={(e) => setSearchText(e.target.value)} + onChange={(e) => { + setSearchText(e.target.value); + setCurrentPage(1) + }} />