diff --git a/CHANGELOG.md b/CHANGELOG.md index 61deacbfc..b7aab250d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres (more or less) to [Semantic Versioning](http://semver.o ## Unreleased +## 0.26.7 + +* fix scrolling with trackpad @ilaiwi #679 +* remove duplicate proptype validation in `TimelineStateContext` @xat + ## 0.26.6 * fix `visibleTimeStart`, `visibleTimeEnd` and `onTimeChange` not working as expected in controlled mode @ilaiwi diff --git a/package.json b/package.json index 74edc6b24..8c7387bdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-calendar-timeline", - "version": "0.26.6", + "version": "0.26.7", "description": "react calendar timeline", "main": "lib/index.js", "scripts": { diff --git a/src/lib/scroll/ScrollElement.js b/src/lib/scroll/ScrollElement.js index cbe8d626a..5f79ae6cd 100644 --- a/src/lib/scroll/ScrollElement.js +++ b/src/lib/scroll/ScrollElement.js @@ -22,7 +22,13 @@ class ScrollElement extends Component { } } - + /** + * needed to handle scrolling with trackpad + */ + handleScroll = () => { + const scrollX = this.scrollComponent.scrollLeft + this.props.onScroll(scrollX) + } refHandler = el => { this.scrollComponent = el @@ -192,6 +198,7 @@ class ScrollElement extends Component { onTouchStart={this.handleTouchStart} onTouchMove={this.handleTouchMove} onTouchEnd={this.handleTouchEnd} + onScroll={this.handleScroll} > {children}