0

I have this code:

   <Slider
        value={state.filters.radius}
        onChange={value => {
          console.log(value);
        }}
        step={5}
        max={20}
        // @ts-ignore
        snapToStep
      />

I have the this version ^7.93.1.
Snap to step is not working and even typescript reports an error that snapToStep prop doesn't exist

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
Dusan Jovanov
  • 547
  • 5
  • 21
  • What you have appears to function correctly here in a [sandbox](https://codesandbox.io/embed/distracted-sammet-r3k9d?fontsize=14&hidenavigation=1&theme=dark). I think this is just a typescript issue. Do you need to import the [slider props interface](https://developer.microsoft.com/en-us/fabric#/controls/web/slider#ISliderProps) definition? – Drew Reese Feb 20 '20 at 08:39
  • Solved it by changing the version to `^6.211.4`. I have no idea why it works now. Although now i get an error `Cannot find module 'office-ui-fabric-react'` – Dusan Jovanov Feb 20 '20 at 11:48

0 Answers0