Skip to content

Commit

Permalink
disabled onDaySelected scroll in reservations list when showOnlySelec…
Browse files Browse the repository at this point in the history
…tedDayItems (wix#1911)

Co-authored-by: katyakostikova <“kostikova21@gmail.com”>
  • Loading branch information
2 people authored and fedoryakubovich committed Oct 12, 2022
1 parent 17727a8 commit 7a88f78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/agenda/reservation-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ class ReservationList extends Component<ReservationListProps, State> {
}

updateReservations(props: ReservationListProps) {
const {selectedDay} = props;
const {selectedDay, showOnlySelectedDayItems} = props;
const reservations = this.getReservations(props);

if (this.list && !sameDate(selectedDay, this.selectedDay)) {
if (!showOnlySelectedDayItems && this.list && !sameDate(selectedDay, this.selectedDay)) {
let scrollPosition = 0;
for (let i = 0; i < reservations.scrollPosition; i++) {
scrollPosition += this.heights[i] || 0;
Expand Down

0 comments on commit 7a88f78

Please sign in to comment.