Skip to content

Commit

Permalink
Merge pull request #404 from LifeSG/fix-time-slot-bar-week
Browse files Browse the repository at this point in the history
Fix TimeSlotBarWeek bugs
  • Loading branch information
qroll authored Jan 31, 2024
2 parents aadc72f + c20b845 commit fb4496b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/time-slot-bar-week/time-slot-bar-week-days.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const TimeSlotBarWeekDays = ({
// React spring animation configuration
const { height: actualHeight, ref: cellsRef } = useResizeDetector();
const height = maxVisibleCellHeight
? expandAll
? actualHeight < maxVisibleCellHeight || expandAll
? actualHeight
: maxVisibleCellHeight
: actualHeight;
Expand Down Expand Up @@ -316,7 +316,9 @@ export const TimeSlotBarWeekDays = ({
}
break;
}
return cellsArray.filter((slot) => !isEmpty(slot));
return cellsArray.filter(
(slot) => !isEmpty(slot) && slot.cellLength > 0
);
}

// =============================================================================
Expand Down

0 comments on commit fb4496b

Please sign in to comment.