Merged in fix/SW-1715-price-details-with-many-rooms (pull request #1421)
Fix/SW-1715 price details with many rooms * fix: added useMemo to stop combineRoomAvailabilities from rerunning * fix: add max height and scroll to modal content * fix: return new array in combineRoomAvailabilities instead of pushing Approved-by: Christian Andolf
This commit is contained in:
@@ -11,7 +11,13 @@ export function combineRoomAvailabilities(
|
||||
return availabilityResults.reduce<RoomsAvailability | null>((acc, result) => {
|
||||
if (result.status === "fulfilled" && result.value) {
|
||||
if (acc) {
|
||||
acc.roomConfigurations.push(...result.value.roomConfigurations)
|
||||
acc = {
|
||||
...acc,
|
||||
roomConfigurations: [
|
||||
...acc.roomConfigurations,
|
||||
...result.value.roomConfigurations,
|
||||
],
|
||||
}
|
||||
} else {
|
||||
acc = result.value
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
/* for supporting animations within content */
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
max-height: 100dvh;
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -48,6 +50,7 @@
|
||||
align-items: center;
|
||||
gap: var(--Spacing-x2);
|
||||
padding: 0 var(--Spacing-x3) var(--Spacing-x4);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.close {
|
||||
@@ -78,4 +81,8 @@
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
max-width: var(--max-width-page);
|
||||
}
|
||||
|
||||
.dialog {
|
||||
max-height: 90dvh;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user