Skip to content

Cannot set slider value back to undefined #9740

@ClivePixton

Description

@ClivePixton

Bug, feature request, or proposal:

Bug

What is the expected behavior?

If a slider has some numeric value, and then the value is set to 'undefined', I would expect the slider to move to the minimum value position.

What is the current behavior?

If a slider has some numeric value, and then the value is set to 'undefined', the slider position does not change.

What are the steps to reproduce?

https://angular-material2-issue-wlz1aj.stackblitz.io

(Note that the slide toggle does behave as expected)

What is the use-case or motivation for changing an existing behavior?

I would like to be able to restore a set of sliders to a previous state (i.e. when undoing), however if the state includes 'undefined' values, that state cannot be accurately restore.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 5.2.2
Material: 5.1.1
OS: darwin x64
TypeScript: 2.6.2
Browser: Chrome 63.0.3239.132

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionshelp wantedThe team would appreciate a PR from the community to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions