Skip to content

Commit

Permalink
Do not set an interval when date domain changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfdsilva committed Nov 6, 2023
1 parent da3b8b7 commit 6b6372a
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,6 @@ export default function Timeline(props: TimelineProps) {
// the domain.
if (!selectedDay || !isWithinInterval(selectedDay, { start, end })) {
setSelectedDay(end);
// Set the interval to last day minus 2 months if able.
const startDate = sub(end, { months: 2 });
setSelectedInterval({
start: isAfter(startDate, start) ? startDate : start,
end
});
}
}, [
prevDataDomain,
Expand Down

0 comments on commit 6b6372a

Please sign in to comment.