From a22aee1520c7c997531036c90cd8f0f26c1c21ef Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Mon, 2 Dec 2024 05:58:10 +0530 Subject: [PATCH] Add checkboxes for RHP --- src/pages/workspace/categories/WorkspaceCategoriesPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 56ba8a5440b8..7d9306795be7 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -84,7 +84,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { const currentConnectionName = PolicyUtils.getCurrentConnectionName(policy); const isQuickSettingsFlow = !!backTo; - const canSelectMultiple = shouldUseNarrowLayout ? selectionMode?.isEnabled : true; + const canSelectMultiple = isSmallScreenWidth ? selectionMode?.isEnabled : true; const fetchCategories = useCallback(() => { Category.openPolicyCategoriesPage(policyId); @@ -182,7 +182,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { const options: Array>> = []; const isThereAnyAccountingConnection = Object.keys(policy?.connections ?? {}).length !== 0; - if (shouldUseNarrowLayout ? canSelectMultiple : selectedCategoriesArray.length > 0) { + if (isSmallScreenWidth ? canSelectMultiple : selectedCategoriesArray.length > 0) { if (!isThereAnyAccountingConnection) { options.push({ icon: Expensicons.Trashcan, @@ -408,7 +408,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { {hasVisibleCategories && !isLoading && ( item && toggleCategory(item)} sections={[{data: categoryList, isDisabled: false}]} onCheckboxPress={toggleCategory}