Skip to content

[Slider] Custom tooltip ignores valueLabelFormat and valueLabelDisplay #17905

Closed
@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 changecomponent: sliderThis is the name of the generic UI component, not the React module!good first issueGreat for first contributions. Enable to learn the contribution process.new featureNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions