You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
I am using visjs and react-visjs-timeline in our reactjs application. I want to catch onMove, OnRemove etc event and call any other method within component to update items in state or redux store. When I try to do it, it throws an error Uncaught TypeError: .... is not a function
It seems like in onMove, onRemove ... other methods could not be reached within a component.
The items are updated in the timeline, but state items and group are not being updated. Looks like only one way data-binding .... If I change any item in the state, then it updates timeline.
Packages used
react-visjs-timeline: 1.5.0
vis version: 4.12.0
I am using visjs and react-visjs-timeline in our reactjs application. I want to catch onMove, OnRemove etc event and call any other method within component to update items in state or redux store. When I try to do it, it throws an error Uncaught TypeError: .... is not a function
It seems like in onMove, onRemove ... other methods could not be reached within a component.
The items are updated in the timeline, but state items and group are not being updated. Looks like only one way data-binding .... If I change any item in the state, then it updates timeline.
Packages used
react-visjs-timeline: 1.5.0
vis version: 4.12.0
Code sample
`class TimelineExample extends React.Component {
onMoveItem = ()=>{
console.log('Im moving');
}
onRemoveItem = () => {
console.log('Im removing');
}
render() {
const options = {
height: 350, // px
editable: {
add: true,
remove: true,
updateTime: true
},
itemsAlwaysDraggable: true,
onMove: function (item, callback) {
onMoveItem(); // Error here
},
onRemove: function (item, callback) {
onRemoveItem(); // Error here
},
};
}
}`
The text was updated successfully, but these errors were encountered: