Hi,
When using the eventCalendar as a controlled component (React) and scrolling in the agenda it will fight your scroll and scroll back to date-labels when passing it. The reason for it is that _shouldSkipScroll is set to true in the scroll handler as it should but then it is set back to false in the _updated function.
My working quick fix is to add:
setTimeout(() => {
this._shouldSkipScroll = true;
}, 0);
To the scroll handler in eventcalendar.ts at about line 711
Minimal repro:
const CalendarAndAgenda = ({ events /* many events */ } : { events: any}) => {
const [selected, setSelected] = useState(() => new Date());
return (
<Eventcalendar
selectedDate={selected}
showControls={false}
data={events}
onSelectedDateChange={({ date }) => setSelected(date as Date)}
view={{
calendar: {
type: ‘week’,
},
agenda: {
type: ‘month’,
}
}}
/>
)
};
And then scroll in the agenda view with mousewheel.