Strange slider behaviour

I tried to make a slider with only odd numbers when I noticed some strange behaviour.
This is the slider I implemented:

st.sidebar.slider('threshold', 1, 15, value=5, step=2)

Now the initial value is correct but when I try to increment the slider it does so with step equal to 3 resulting in 8. From there it only uses step two and I’m only able to use even numbers. I have a workaround for this, but I feel like this isn’t wanted behaviour.

Hey @Snertie,

Thanks for reporting this, i went ahead and created a ticket on Github here.

1 Like