direct sale fix

This commit is contained in:
unknown 2026-02-12 17:44:13 +05:30
parent f980211e83
commit ba013fc415
1 changed files with 11 additions and 1 deletions

View File

@ -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)
}}
/>
</div>
<div style={{ marginBottom: '10px', color: '#666', fontSize: '14px', fontStyle: 'italic' }}>