palantir/blueprint

Add a "onGrab" event to the Slider

オープン

#3,575 opened on 2019/05/29

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,167 件のフォーク)batch import
P2Package: coreType: feature requesthelp wanted

Repository metrics

Stars
 (20,263 個のスター)
PR merge metrics
 (平均マージ 43d 10h) (30d で 27 merged PRs)

説明

Environment

Package version: @blueprintjs/core 3.15.1 Browser: Chrome 74+

Feature request

Currently the slider supports an onChange and onRelease event - it would be useful to also have an onGrab (or similar) event which is invoked when the user grabs the slider handle without releasing it.

Examples

A scenario when this would be useful is when using the slider as a scrubber control for a video. If the value of the slider is updated due to the user grabbing the handle and sliding, we would want to:

  • Immediately reflect the new value in the slider so that it stays responsive; but
  • Debounce the updates that tell the video to load at the current time. Otherwise we end up loading/trying to show a lot of "intermediate" frames that just get dropped as the user slides the handle.

コントリビューターガイド