Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

clear ng-model on md-select does not work when multiple #2921

Closed
myagoo opened this issue May 20, 2015 · 7 comments
Closed

clear ng-model on md-select does not work when multiple #2921

myagoo opened this issue May 20, 2015 · 7 comments
Assignees
Milestone

Comments

@myagoo
Copy link

myagoo commented May 20, 2015

mdSelect does not refresh view value when multiple is true and value is set to undefined.

Here is an example pen forked from validation demo of mdSelect directive
http://codepen.io/myagoo/pen/jPMOwZ

@ByJC
Copy link

ByJC commented May 20, 2015

+1

1 similar comment
@whoknows
Copy link

+1

@ThomasBurleson ThomasBurleson modified the milestone: Backlog May 27, 2015
@myagoo
Copy link
Author

myagoo commented Jun 1, 2015

Any workaround while waiting for this to be fixed ? This bug is really annoying, we use md-select to build a generic selector abstraction in our application and we are unable to reset them ><
Also, I updated the associated codepen as it seemed everything worked fine.

@sckoh
Copy link

sckoh commented Jun 3, 2015

i use ng-if to recreate the md-select when i click on the reset button as a temporary workaround

<md-select ng-if='recreateSelect'>

$scope.recreateSelect = true;
$scope.reset = function() {
    $scope.recreateSelect = false;
    $timeout(function() {
        $scope.recreateSelect = true;
    }, 100);

@Masadow
Copy link

Masadow commented Jun 24, 2015

@sckoh Good workaround ! I prefer to use a timeout 0 to avoid the blink effect.

@anjroo
Copy link

anjroo commented Jul 2, 2015

@sckoh Thank you! Exactly the problem I was facing. Great solution.

@naresh8t7
Copy link

When the fix will be available for this issue ?

@rschmukler rschmukler modified the milestones: 0.11.0, Backlog Aug 14, 2015
kennethcachia pushed a commit to kennethcachia/material that referenced this issue Sep 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants