question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use odd numbers within Slider Component

See original GitHub issue

Summary

There’s no way to use odd numbers steps within slider component.

Using: st.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.

Expected behavior:

The step should be applied to the current value .

Additional information

https://discuss.streamlit.io/t/strange-slider-behaviour/1130

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jrhonecommented, May 1, 2020

Fixed by #1319 . Will be available with the next release, 0.58.1

Alternatively, it’s available now in nightly

0reactions
RavenPillmanncommented, May 1, 2020

For visibility’s sake, I’m also having this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get only odd numbers from a slider? - Stack Overflow
A proper UI would represent the actual value. You should consider modifying the slider control to force it being set to odd values...
Read more >
Assigning rule to grasshopper in combination with number slider
The slider won't show the result, but that is common - like using a 0.0 to 1.0 slider to choose items in a...
Read more >
Grasshopper 101: User Objects | #04 Number Slider - YouTube
In this video, we are going to familiarize ourselves with the Number Slider and its properties: the expression, grip style, rounding options ...
Read more >
Good alternative to a slider for a long list of numeric values
Due to a technical reason, I can't use the slider component I have for this, because it requires the step to be consistent....
Read more >
A Sliding Nightmare: Understanding the Range Input
In Chrome, at the top of the shadow DOM, we have a div we cannot ... of sliders and controls (and their components)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found