palantir/blueprint

Is there a way to delete a slider handle with a mouse event?

Open

#4,301 建立於 2020年8月31日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)TypeScript (20,263 star) (2,167 fork)batch import
P2Package: coreType: feature requesthelp wanted

描述

Environment

  • Package version(s): 3.25.0
  • Browser and OS versions: Ubuntu 18.04, Chrome 84

Question

For the Slider.Handle component, it seems like there's no native event listeners other than onChange and onRelease. I wanted to implement something like a double click to remove a handle. I'm guessing that the onClick listener is not supported due to interfering with the drag behavior, but I was wondering if there was any other way I could implement something similar. I got around the addition by having another button on the right that would add a handle on the right side, but it would be nice if I can add a handle anywhere on the slider track more intuitively.

貢獻者指南