Skip to content

[slider] Add a logarithmic scale example#6672

Merged
oliviertassinari merged 1 commit into
mui:masterfrom
oliviertassinari:slider-logscale-2
Apr 22, 2017
Merged

[slider] Add a logarithmic scale example#6672
oliviertassinari merged 1 commit into
mui:masterfrom
oliviertassinari:slider-logscale-2

Conversation

@oliviertassinari

@oliviertassinari oliviertassinari commented Apr 22, 2017

Copy link
Copy Markdown
Member

Fixed the mistake I have done with #6670.

@oliviertassinari oliviertassinari changed the title [Slider] Add a logarithmic scale example (#6670) [Slider] Add a logarithmic scale example Apr 22, 2017
@oliviertassinari
oliviertassinari merged commit 890de59 into mui:master Apr 22, 2017
@oliviertassinari
oliviertassinari deleted the slider-logscale-2 branch April 22, 2017 15:28
@oliviertassinari oliviertassinari added scope: slider Changes related to the slider. and removed PR: Needs Review labels Apr 22, 2017
@idoco

idoco commented Apr 22, 2017

Copy link
Copy Markdown

Hi @oliviertassinari I really like this example, thanks!
One question, why did you set step={max / 100}?
I'm asking because when I changed it to 1 locally few things stopped working for me, like controlling the slider from the keyboard. That got me confused about the meaning of the step prop in this context.

@oliviertassinari

oliviertassinari commented Apr 22, 2017

Copy link
Copy Markdown
Member Author

why did you set step={max / 100}?

The step property represents the smallest amount user can change in the [min, max] range.
With that value, the slider can have 100 unique positions, I feel like it a good choice for the given width of the slider in the demo.

@idoco

idoco commented Apr 22, 2017

Copy link
Copy Markdown

@oliviertassinari Yeah, I know the general role of the step prop, I was wondering about it in the context of this example. Maybe I'm missing something, but wont that mean that the slider will only be able to move in steps of 10k?
This might be unrelated, but why does it stop responding to keyboard control when I set the step size to 1?

Thanks.

@oliviertassinari

Copy link
Copy Markdown
Member Author

You are right by 10k steps.
I have no idea what's going one with the keyboard.

@idoco

idoco commented Apr 22, 2017

Copy link
Copy Markdown

ok, thanks.
I guess that the 10k step are also normalized by the transformation, so the slider moves in changing increments.

(Typo fixed)

w9jds pushed a commit to w9jds/material-ui that referenced this pull request Apr 26, 2017
commit 890de59
Author: Olivier Tassinari <[email protected]>
Date:   Sat Apr 22 17:28:08 2017 +0200

    [Slider] Add a logarithmic scale example (mui#6670) (mui#6672)

    [Slider] Add a logarithmic scale example

commit d02365c
Author: Olivier Tassinari <[email protected]>
Date:   Sat Apr 22 17:14:52 2017 +0200

    Revert "[Slider] Add a logarithmic scale example (mui#6670)"

    This reverts commit f140ea3.

commit f140ea3
Author: Olivier Tassinari <[email protected]>
Date:   Sat Apr 22 17:13:22 2017 +0200

    [Slider] Add a logarithmic scale example (mui#6670)
anhdd-kuro pushed a commit to anhdd-kuro/material-ui that referenced this pull request Apr 8, 2026
[Slider] Add a logarithmic scale example
@oliviertassinari oliviertassinari changed the title [Slider] Add a logarithmic scale example [slider] Add a logarithmic scale example May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: slider Changes related to the slider.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants