Slider: Pushable With Number Does Not Work

Created on 18 Apr 2018  路  2Comments  路  Source: react-component/slider

Hello,

I'm using 8.6.1, and the following code sample:

<Range
                min={0}
                max={1440}
                allowCross={false}
                pushable={60}
                step={15}
              />

Does not result in pushable nodes. If I set the pushable attribute to true instead, it does work, but sets the minimum gap to the step which is 15 (rather than my intended 60).

Am I misunderstanding how the pushable property is supposed to work (based on the readme.md description) or is there a bug in this version?

Most helpful comment

I've done a bit more testing, and this actually works if I remove the allowCross attribute.

All 2 comments

I've done a bit more testing, and this actually works if I remove the allowCross attribute.

Pushable seems to work, but only when I set step. Seems to crash my browser when I don't set step.

<Range
          min={21600000}
          max={108000000}
          defaultValue={[39600000, 93600000]}
          pushable={30000}
          //step={30000}
          tipFormatter={value => moment(value).format('k:mm:ss')}
        />

^^ Crashes

<Range
          min={21600000}
          max={108000000}
          defaultValue={[39600000, 93600000]}
          pushable={30000}
          step={30000}
          tipFormatter={value => moment(value).format('k:mm:ss')}
        />

^^ Good.

Browser -- Chrome
Version -- ^8.7.0

Was this page helpful?
0 / 5 - 0 ratings