Skip to content

Commit

Permalink
679 (#680)
Browse files Browse the repository at this point in the history
679
  • Loading branch information
Ilaiwi authored Nov 8, 2019
2 parents beb3add + 95680ae commit f7ffd40
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
9 changes: 8 additions & 1 deletion src/lib/scroll/ScrollElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -192,6 +198,7 @@ class ScrollElement extends Component {
onTouchStart={this.handleTouchStart}
onTouchMove={this.handleTouchMove}
onTouchEnd={this.handleTouchEnd}
onScroll={this.handleScroll}
>
{children}
</div>
Expand Down

0 comments on commit f7ffd40

Please sign in to comment.