From 711bbe83ca7d3770a14db4fd9f6a33cb5f4d7c19 Mon Sep 17 00:00:00 2001 From: Samandar Turgunboyev Date: Wed, 28 Jan 2026 13:46:30 +0500 Subject: [PATCH] bug fix --- src/features/plans/ui/PalanTable.tsx | 9 ++++----- src/features/plans/ui/ProductList.tsx | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/features/plans/ui/PalanTable.tsx b/src/features/plans/ui/PalanTable.tsx index fec3443..c713604 100644 --- a/src/features/plans/ui/PalanTable.tsx +++ b/src/features/plans/ui/PalanTable.tsx @@ -25,7 +25,8 @@ interface Props { selectedProducts: number[]; setSelectedProducts: Dispatch>; handleBulkDelete: () => void; - totalCount?: number; + totalCount: number; + count: number; handleSelectAllPages: () => void; isAllPagesSelected: boolean; } @@ -41,7 +42,7 @@ const ProductTable = ({ selectedProducts, setSelectedProducts, handleBulkDelete, - totalCount = 0, + totalCount, handleSelectAllPages, isAllPagesSelected, }: Props) => { @@ -96,9 +97,7 @@ const ProductTable = ({
- {isAllPagesSelected - ? `Barcha ${totalCount} ta mahsulot tanlandi` - : `${selectedProducts.length} ta mahsulot tanlandi`} + {`${selectedProducts.length} ta mahsulot tanlandi`}
{!isAllPagesSelected && totalCount > products.length && ( diff --git a/src/features/plans/ui/ProductList.tsx b/src/features/plans/ui/ProductList.tsx index 0a33573..64b1a70 100644 --- a/src/features/plans/ui/ProductList.tsx +++ b/src/features/plans/ui/ProductList.tsx @@ -41,8 +41,6 @@ const ProductList = () => { setPlanDelete(product); }; - console.log(selectedProducts); - const handleSelectAllPages = async () => { try { if (!data?.total) return; @@ -100,6 +98,7 @@ const ProductList = () => {