File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ and this project adheres (more or less) to [Semantic Versioning](http://semver.o
99
1010* Add unit argument to onZoom and onTimeChange callbacks
1111
12+ ## 0.26.7
13+
14+ * fix scrolling with trackpad @ilaiwi #679
15+ * remove duplicate proptype validation in ` TimelineStateContext ` @xat
16+
1217## 0.26.6
1318
1419* fix ` visibleTimeStart ` , ` visibleTimeEnd ` and ` onTimeChange ` not working as expected in controlled mode @ilaiwi
Original file line number Diff line number Diff line change 11{
22 "name" : " react-calendar-timeline" ,
3- "version" : " 0.26.6 " ,
3+ "version" : " 0.26.7 " ,
44 "description" : " react calendar timeline" ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -22,7 +22,13 @@ class ScrollElement extends Component {
2222 }
2323 }
2424
25-
25+ /**
26+ * needed to handle scrolling with trackpad
27+ */
28+ handleScroll = ( ) => {
29+ const scrollX = this . scrollComponent . scrollLeft
30+ this . props . onScroll ( scrollX )
31+ }
2632
2733 refHandler = el => {
2834 this . scrollComponent = el
@@ -192,6 +198,7 @@ class ScrollElement extends Component {
192198 onTouchStart = { this . handleTouchStart }
193199 onTouchMove = { this . handleTouchMove }
194200 onTouchEnd = { this . handleTouchEnd }
201+ onScroll = { this . handleScroll }
195202 >
196203 { children }
197204 </ div >
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ export class TimelineStateProvider extends React.Component {
4343 canvasWidth : PropTypes . number . isRequired ,
4444 showPeriod : PropTypes . func . isRequired ,
4545 timelineUnit : PropTypes . string . isRequired ,
46- showPeriod : PropTypes . func . isRequired ,
47- timelineUnit : PropTypes . string . isRequired ,
4846 timelineWidth : PropTypes . number . isRequired ,
4947 }
5048
You can’t perform that action at this time.
0 commit comments