plotly / plotly/react-plotly.js

`onSelected`: Keep default behavior of events

未關閉
#180 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.1k
分支
138
平均合併
3 天 2 小時
30 天內合併 PR
4

描述

Is there any way to keep the default behavior of events while providing a handler?

From what I understand from this post, unless the overridden function returns false the default behavior should be kept. However, when I provide an onSelected method the default behavior doesn't happen, no matter what the returned value is.
TBH, I'm not sure whether what I'm asking for is the expected behavior, but depending on the answer you can interpret this question as a feature request or a request for document clarification.

To make this more clear, what I see when onSelected is not provided is that the selected area stays active even after mouse is released and you can even select multiple regions like so:
image
However, when onSelected is provided, the selected region disappears after the mouse is released and I cannot reproduce the same behavior (at least not so easily).
To give you more context, my specific use-case here is to be able to download the information of the selected points using a separate button that I have created, so the default visual response works well for me.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

此 issue 未指定原始檔案、測試或進入點。先重現 Plotly 在沒有 onSelected 處理器與有 onSelected 處理器時的選取差異,然後將元件的 onSelected 行為與連結的 Plotly 事件文件進行比較。完成的標準是:要麼在處理事件的同時保留預設的已選取區域視覺效果,要麼清楚地記錄預期行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, react
領域
data-visualization, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。