React-calendar-timeline: Horizontal scroll breaks controlled mode

Created on 3 Feb 2020  路  5Comments  路  Source: namespace-ee/react-calendar-timeline

Describe the bug
When in controlled mode (either using visibleTimeStart/end or defaultTime and onTimeChange), scrolling with a trackpad (two fingers) or middlemouse-click scroll ignores the boundry set. This scrolls the underlying "3x wide scrolling canvas" to either edge.

To Reproduce
This bug is visible in the "Controlled scroll" demo: codesandbox

Expected behavior
The viewport should be fully controllable with either visibleTimeStart/end, or by logic in onTimechange. Trackpad or middlemouse-click scroll should not scroll outside the boundry set.

Library Version
react-calendar-timeline 0.26.7

Desktop:

  • OS: Windows 10
  • Browser: Chrome
bug

Most helpful comment

Hi, we've got the same problem but It is blocker for us. We need to use horizontal scroll (with working trackpad) along with overscan scroll for knowing when to fetch next batch of data.

All 5 comments

@fredrik-bjaras thanks for noting this. This happens when you do scrolling via trackpad which is very hard to control. I will try to fix it asap

@Ilaiwi That would be great! Worked around it by disabling the scroll of the underlying scroll component with overflow-x: hidden; in .react-calendar-timeline .rct-scroll which seemed to work fine, but it would be nice to be able to use the trackpad scroll in future!

Hi, we've got the same problem but It is blocker for us. We need to use horizontal scroll (with working trackpad) along with overscan scroll for knowing when to fetch next batch of data.

Would love to see this get fixed for the controlled timeline usecase.

It seems that horizontal scrolling has been 'broken' (not following the rules set by onTimeChange) since release 0.26.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

napatwongchr picture napatwongchr  路  5Comments

elodszopos picture elodszopos  路  5Comments

mdrulis-neurosys picture mdrulis-neurosys  路  7Comments

DHerls picture DHerls  路  3Comments

nirchernia picture nirchernia  路  3Comments