Skip to content
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

MultiSlider.Handle className prop doesn't seem to be getting propagated to the rendered element. #4440

Closed
cybae0804 opened this issue Dec 1, 2020 · 1 comment · Fixed by #4442

Comments

@cybae0804
Copy link
Contributor

cybae0804 commented Dec 1, 2020

Environment

  • Package version(s): 3.25.0
  • Operating System: Ubuntu 18
  • Browser name and version: Brave Version 1.17.73 Chromium: 87.0.4280.67

Code Sandbox

Link to a minimal repro: Here

Steps to reproduce

  1. Provide a classname to a MultiSlider.Handle

Actual behavior

The rendered span element does not receive the user provided className.

Expected behavior

The rendered span element does receive the user provided className.

Possible solution

If you look at the code for the handle, it does indeed receive a className prop and puts it on the span element.

className={classNames(Classes.SLIDER_HANDLE, { [Classes.ACTIVE]: isMoving }, className)}

However, if you look at the MultiSlider code, specifically the renderHandles function, it only passes the preset classNames.

className={classNames({
    [Classes.START]: type === HandleType.START,
    [Classes.END]: type === HandleType.END,
})}

I may be reading the code wrong, so please feel free to correct me.

@adidahiya
Copy link
Contributor

Your assessment is correct, this looks like a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants