Merged in fix/SW-2841-filter-popup-closing-on-select (pull request #2289)

Fix/SW-2841 filter popup closing on select

* fix(SW-2841): refactored so that filter modal is not closed when selecting filters

* fix(SW-2841): rename component

* fix: review feedback

* fix: move font-family

* fix: change init value of filteredHotelIds

* fix

* fix: add Typography tag


Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
This commit is contained in:
Tobias Johansson
2025-06-13 07:41:31 +00:00
parent 7be6c5dfb5
commit e645b15c6e
18 changed files with 339 additions and 175 deletions

View File

@@ -21,7 +21,7 @@ import { useScrollToTop } from "@/hooks/useScrollToTop"
import { debounce } from "@/utils/debounce"
import BookingCodeFilter from "../../BookingCodeFilter"
import FilterAndSortModal from "../../FilterAndSortModal"
import FilterAndSortModal from "../../Filters/FilterAndSortModal"
import HotelListing from "../HotelListing"
import { getVisibleHotels } from "./utils"
@@ -150,6 +150,8 @@ export default function SelectHotelContent({
const showBookingCodeFilter =
bookingCode && isBookingCodeRateAvailable && !isSpecialRate
const unfilteredHotelCount = hotelPins.length
return (
<div className={styles.container}>
<div className={styles.listingContainer} ref={listingContainerRef}>
@@ -184,7 +186,10 @@ export default function SelectHotelContent({
<RoomCardSkeleton />
</div>
) : (
<HotelListing hotels={visibleHotels} />
<HotelListing
hotels={visibleHotels}
unfilteredHotelCount={unfilteredHotelCount}
/>
)}
{showBackToTop && (
<BackToTopButton position="left" onClick={scrollToTop} />