Polaris-react: Cannot set max of 0 on RangeSlider

Created on 3 Jul 2018  路  5Comments  路  Source: Shopify/polaris-react

Issue summary

A max of 0 on the RangeSlider component is ignored.

Expected behavior

Passing max={0} should render a RangeSlider with a maximum value of 0.

Actual behavior

The RangeSlider renders with a maximum value of 100 because of this line.

Steps to reproduce the problem

  1. Render a RangeSlider component with max={0}
  2. Check the maximum value the slider will allow.

Specifications

  • Are you using the React components? (Y/N): Y
  • Polaris version number: v2.2.0
  • Browser: Google Chrome Version 67.0.3396.99 (Official Build) (64-bit)
  • Device: Macbook Pro
  • Operating System: macOS Sierra Version 10.12.6 (16G29)
馃悰Bug

All 5 comments

Thanks for reporting. I鈥檝e added this to our internal bug tracker.

We鈥檙e working on a fix for this.

Awesome, thanks for the update @ry5n!

A fix for this will be available in the next release.

(@andrewpye v2.3.1 has shipped with the fix)

Was this page helpful?
0 / 5 - 0 ratings