Skip to content

[Slider] Custom tooltip ignores valueLabelFormat and valueLabelDisplay #17905

@Floriferous

Description

@Floriferous

When you use the Slider with a custom ValueLabelComponent, it ignores the passed valueLabelFormat and valueLabelDisplay.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When you provide a custom component it gets the raw number value as a prop, instead of the formatted one. It also doesn't display according to valueLabelDisplay.

Expected Behavior 🤔

I expect the value prop passed to the ValueLabelComponent to be formatted by the valueLabelFormat.

I also expect the valueLabelDisplay value to impact whether the ValueLabelComponent is displayed or not.

Steps to Reproduce 🕹

https://codesandbox.io/s/create-react-app-0jbd4

Your Environment 🌎

Tech Version
Material-UI v4.5.1
React v16.10.2
Browser Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIntroduces changes that are not backward compatible.good first issueGreat for first contributions. Enable to learn the contribution process.scope: sliderChanges related to the slider.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions