Skip to content

Commit f7ffd40

Browse files
authored
2 parents beb3add + 95680ae commit f7ffd40

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres (more or less) to [Semantic Versioning](http://semver.o
77

88
## Unreleased
99

10+
## 0.26.7
11+
12+
* fix scrolling with trackpad @ilaiwi #679
13+
* remove duplicate proptype validation in `TimelineStateContext` @xat
14+
1015
## 0.26.6
1116

1217
* fix `visibleTimeStart`, `visibleTimeEnd` and `onTimeChange` not working as expected in controlled mode @ilaiwi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {

src/lib/scroll/ScrollElement.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)