Skip to content

Commit

Permalink
fix: refetching when changing filter over empty area
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyjablonski committed Nov 18, 2024
1 parent f2af554 commit a55d342
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ function ListingsSearchCombined(props: ListingsSearchCombinedProps) {
let newMeta

// Don't search listings as you move the map if you're in mobile map view, otherwise update the list
if ((!isFirstBoundsLoad && (isDesktop || listView)) || !isDesktop) {
if (
(!isFirstBoundsLoad &&
(isDesktop || listView) &&
!(visibleMarkers?.length === 0 && changingFilter)) ||
!isDesktop
) {
setIsLoading(true)
const result = await searchListings(
isDesktop ? listingIdsOnlyQb : genericQb,
Expand Down

0 comments on commit a55d342

Please sign in to comment.