I'm using react-visjs-timeline as a react component in a page I have. I have a state setter function (created using UseState react hook).
In my onSelect handler I call the state setter function - but that triggers a redraw of the timeline and the selection in the timeline disappears.
How can I set some state based on the selected item in the timeline without losing the item from being selected? Here's my selection handler. The setSelectedCue is the function that sets the state and triggers the selection to be lost.
I'm using react-visjs-timeline as a react component in a page I have. I have a state setter function (created using UseState react hook).
In my onSelect handler I call the state setter function - but that triggers a redraw of the timeline and the selection in the timeline disappears.
How can I set some state based on the selected item in the timeline without losing the item from being selected? Here's my selection handler. The setSelectedCue is the function that sets the state and triggers the selection to be lost.