-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Slider #2980
Labels
Comments
I think I fixed a similar issue a while ago. Can you share your code (just the slider part) for me to double check? |
Controller form 'react hook form'
|
@armatrix or can you verify using this canary version?
|
nope, not working, click 20x, the value is still not 20.
|
wingkwong
added
🐛 Type: Bug
Something isn't working
📦 Scope : Components
Related to the components
and removed
🔎 Status: More Info Needed
labels
May 13, 2024
ok will take a look |
preliminary findings
const [value, setValue] = React.useState<SliderValue>(25);
return (
<div className="flex flex-col gap-2 w-full h-full max-w-md items-start justify-center">
<Slider
className="pb-6"
classNames={{
base: "max-w-md",
label: "text-medium",
}}
defaultValue={2}
label="Leverage"
marks={[
{
value: 2,
label: "2x",
},
{
value: 10,
label: "10x",
},
{
value: 20,
label: "20x",
},
{
value: 30,
label: "30x",
},
{
value: 40,
label: "40x",
},
{
value: 50,
label: "50x",
},
]}
maxValue={50}
minValue={2}
size="sm"
step={0.01}
value={Number(value)}
onChange={setValue}
/>
<p className="text-default-500 text-small">Current volume: {value}</p>
</div>
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NextUI Version
v2.3.6
Describe the bug
can not get right value while slider marks clicked
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
set small steps for marks, while clicking mark value, slider value not been set right.
Expected behavior
I wanna catch the right value while clicking the 'mark', kindly check the video below
Screenshots or Videos
Screen.Recording.2024-05-11.at.21.09.29.mov
Operating System Version
macos
Browser
Chrome
The text was updated successfully, but these errors were encountered: