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 (2,167 fork)batch import
P2Package: coreType: feature requesthelp wanted

仓库指标

Star
 (20,263 star)
PR 合并指标
 (平均合并 43天 10小时) (30 天内合并 27 个 PR)

描述

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.

贡献者指南