Skip to content

Commit 845b3e7

Browse files
committed
Fix for Context Menu unintentionally disabled by default. Also a documentation update
1 parent 9182d7e commit 845b3e7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ Rather than applying props on the element yourself and to avoid your props being
435435
* onTouchEnd: event handler
436436
* onDoubleClick: event handler
437437
* onContextMenu: event handler
438-
* style: inline object
439-
438+
* style: inline object
439+
440440

441441
\*\* _the given styles will only override the styles that are not a requirement for positioning the item. Other styles like `color`, `radius` and others_
442442

@@ -1263,7 +1263,7 @@ $ yarn start
12631263

12641264
Check http://0.0.0.0:8888/ in your browser and have fun!
12651265

1266-
Please run `npm run lint` before you send a pull request. `npm run jest` runs the tests.
1266+
Please run `npm run lint` before you send a pull request. `npm run test` runs the jest tests.
12671267

12681268
<!--
12691269

src/lib/Timeline.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export default class ReactCalendarTimeline extends Component {
411411
)
412412
)
413413
}
414-
414+
415415
return derivedState
416416
}
417417

@@ -821,7 +821,7 @@ export default class ReactCalendarTimeline extends Component {
821821
itemDrag={this.dragItem}
822822
itemDrop={this.dropItem}
823823
onItemDoubleClick={this.doubleClickItem}
824-
onItemContextMenu={this.contextMenuClickItem}
824+
onItemContextMenu={this.props.onItemContextMenu ? this.contextMenuClickItem : undefined}
825825
itemResizing={this.resizingItem}
826826
itemResized={this.resizedItem}
827827
itemRenderer={this.props.itemRenderer}
@@ -871,13 +871,13 @@ export default class ReactCalendarTimeline extends Component {
871871

872872
/**
873873
* check if child of type TimelineHeader
874-
* refer to for explanation https://github.com/gaearon/react-hot-loader#checking-element-types
874+
* refer to for explanation https://github.com/gaearon/react-hot-loader#checking-element-types
875875
*/
876876
isTimelineHeader = (child) => {
877877
if(child.type === undefined) return false
878878
return child.type.secretKey ===TimelineHeaders.secretKey
879879
}
880-
880+
881881
childrenWithProps(
882882
canvasTimeStart,
883883
canvasTimeEnd,

0 commit comments

Comments
 (0)