Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/angular-selectbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@

$scope.$on('$destroy', _unbind);

$scope.$watch('vm.value',function(){
// watches value changes from external locations.
// Useful for working with socket.io
_getSelected();
Copy link

@myershov myershov Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milica, thank you for your job!
I have found similar bug in my apps, and that solution resolve my problem.
@mertpamukcu, great that you found it;
But we have one more problem;
We need to delete additional call
_getSelected();
From function 'change' at line 177, because it will be called from watch; Avoided double call.

});

/**
* Get selected object
*
Expand Down