首页 > 解决方案 > Unbind React Plotly events

问题描述

I'm looking for a working method to unbind events (particularly 'plotly_deselect') using React Plotly.

I've tried the following methods :

  useEffect(() => {
    document.removeEventListener('plotly_deselect', (_) => null)
  }, [])

and

<Plot ... onDeselect={() => null}/>

But the event is still trigered.

标签: javascriptreactjseventsplotly

解决方案


推荐阅读