Open nasir-awan opened 5 years ago
I need this too!
Wait a minute. This works fine for me! I have:
const onMoveItem = (item, callback) => {
console.log(item)
item.paneObj.startTime = item.start
}
const jsvizTlOptions = {
showCurrentTime: false,
onMove: onMoveItem
}
okay great - now it access state
This works ...
const { updateTimelineItem } = this.props
const onMoveItem = (item, callback) => {
console.log(item)
updateTimelineItem(item)
}
const options = {
showCurrentTime: false,
onMove: onMoveItem
}
Overview
Handle editing items
I have integrated with reactjs app, I need to update item in state or make a call to method using onMove event but it does not allow.
Uncaught TypeError: this.handleMove is not a function
Package versions
react-visjs-timeline: 1.5.0 vis version: 4.12.0
Code Snippet
options = { onMove: function(item, callback){
//this.handleMove();
} }