File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 772772 } ;
773773
774774 SingleSelect2 . prototype . updateSelection = function ( data ) {
775- this . selection . find ( "span" ) . html ( this . opts . formatSelection ( data ) ) ;
776- this . selection . removeClass ( "select2-default" ) ;
775+ this . selection
776+ . find ( "span" )
777+ . html ( this . opts . formatSelection ( data ) )
778+ . removeClass ( "select2-default" ) ;
777779 if ( this . opts . allowClear && this . getPlaceholder ( ) !== undefined ) {
778780 this . selection . find ( "abbr" ) . show ( ) ;
779781 }
790792
791793 if ( this . select ) {
792794 // val is an id
793- this . select . val ( val ) ;
794- this . select . find ( ":selected" ) . each ( function ( ) {
795- data = { id : $ ( this ) . attr ( "value" ) , text : $ ( this ) . text ( ) } ;
796- return false ;
797- } ) ;
795+ this . select
796+ . val ( val )
797+ . find ( ":selected" ) . each ( function ( ) {
798+ data = { id : $ ( this ) . attr ( "value" ) , text : $ ( this ) . text ( ) } ;
799+ return false ;
800+ } ) ;
798801 this . updateSelection ( data ) ;
799802 } else {
800803 // val is an object
You can’t perform that action at this time.
0 commit comments