Skip to content

Commit 89bcf5b

Browse files
katyakostikovakatyakostikova
andauthored
disabled onDaySelected scroll in reservations list when showOnlySelectedDayItems (#1911)
Co-authored-by: katyakostikova <“[email protected]”>
1 parent 32efe4a commit 89bcf5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agenda/reservation-list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ class ReservationList extends Component<ReservationListProps, State> {
123123
}
124124

125125
updateReservations(props: ReservationListProps) {
126-
const {selectedDay} = props;
126+
const {selectedDay, showOnlySelectedDayItems} = props;
127127
const reservations = this.getReservations(props);
128128

129-
if (this.list && !sameDate(selectedDay, this.selectedDay)) {
129+
if (!showOnlySelectedDayItems && this.list && !sameDate(selectedDay, this.selectedDay)) {
130130
let scrollPosition = 0;
131131
for (let i = 0; i < reservations.scrollPosition; i++) {
132132
scrollPosition += this.heights[i] || 0;

0 commit comments

Comments
 (0)