File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ angular.module('angularify.semantic.dropdown', ['ngSanitize'])
2222 } ;
2323
2424 this . update_title = function ( title ) {
25- console . log ( title ) ;
2625 var i = 0 ;
2726 for ( i in $scope . items ) {
2827 $scope . items [ i ] . title = title ;
@@ -73,20 +72,23 @@ angular.module('angularify.semantic.dropdown', ['ngSanitize'])
7372 //
7473 scope . $watch ( 'model' , function ( val ) {
7574 // update title
75+ scope . model = val ;
7676 DropDownController . update_title ( val ) ;
7777 } ) ;
7878
7979 //
8080 // Click handler
8181 //
8282 element . bind ( 'click' , function ( ) {
83+
8384 if ( scope . open === false ) {
8485 scope . open = true ;
8586 scope . $apply ( function ( ) {
8687 scope . dropdown_class = 'ui selection dropdown active visible' ;
8788 } ) ;
8889 } else {
8990 scope . open = false ;
91+ scope . model = scope . title
9092 scope . $apply ( function ( ) {
9193 scope . dropdown_class = 'ui selection dropdown' ;
9294 } ) ;
@@ -121,6 +123,7 @@ angular.module('angularify.semantic.dropdown', ['ngSanitize'])
121123 // Menu item click handler
122124 //
123125 element . bind ( 'click' , function ( ) {
126+
124127 DropDownController . update_title ( scope . title ) ;
125128 } ) ;
126129 }
You can’t perform that action at this time.
0 commit comments