Skip to content

Commit 45df246

Browse files
fix: hide Showing X of Y items label and categories filter during catalog search on iOS
Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
1 parent 12b29d4 commit 45df246

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

apps/expo/features/catalog/screens/CatalogItemsScreen.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,16 @@ function CatalogItemsScreen() {
161161
}}
162162
/>
163163

164-
<CategoriesFilter
165-
data={categories}
166-
onFilter={setActiveFilter}
167-
activeFilter={activeFilter}
168-
error={categoriesError}
169-
retry={refetchCategories}
170-
className="px-4 py-2"
171-
/>
164+
{!isSearching && (
165+
<CategoriesFilter
166+
data={categories}
167+
onFilter={setActiveFilter}
168+
activeFilter={activeFilter}
169+
error={categoriesError}
170+
retry={refetchCategories}
171+
className="px-4 py-2"
172+
/>
173+
)}
172174

173175
<FlatList
174176
key={activeFilter}
@@ -197,14 +199,16 @@ function CatalogItemsScreen() {
197199
</View>
198200
}
199201
ListHeaderComponent={
200-
<View className="mb-4">
201-
<View className="flex-row items-center justify-between">
202-
<Text className="text-muted-foreground">{totalItemsText}</Text>
202+
!isSearching ? (
203+
<View className="mb-4">
204+
<View className="flex-row items-center justify-between">
205+
<Text className="text-muted-foreground">{totalItemsText}</Text>
206+
</View>
207+
{paginatedItems.length > 0 && (
208+
<Text className="mt-1 text-xs text-muted-foreground">{showingText}</Text>
209+
)}
203210
</View>
204-
{paginatedItems.length > 0 && (
205-
<Text className="mt-1 text-xs text-muted-foreground">{showingText}</Text>
206-
)}
207-
</View>
211+
) : null
208212
}
209213
ListEmptyComponent={
210214
<View className="flex-1 items-center justify-center p-8">

0 commit comments

Comments
 (0)