-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(slider): add the ability to apply custom formatting to thumb label #10243
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
Conversation
src/lib/slider/slider.md
Outdated
|
||
```ts | ||
// Inside your component | ||
@Component({ ... }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to an embedded example?
* in the thumb label. Can be used to format very large number in order | ||
* for them to fit into the slider thumb. | ||
*/ | ||
@Input() displayWith: (value: number | null) => string | number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
displayWith
is kind of a weird name. What about formatter
or formatFunction
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with this one, because we use the same for the autocomplete.
f67c76a
to
dd1b5cd
Compare
Adds the `displayWith` input on the slider that allows consumers to specify how the thumb label will be formatting. This is useful for cases like very large numbers where the number might be too long for the thumb label. Fixes angular#9431.
dd1b5cd
to
6032964
Compare
Addressed the feedback @mmalerba. |
Is this not in 5.2.4 release? I just upgraded and cannot see the feature. |
This PR is marked as |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
displayWith
input on the slider that allows consumers to specify how the thumb label will be formatting. This is useful for cases like very large numbers where the number might be too long for the thumb label.Fixes #9431.