This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2213,6 +2213,26 @@ describe('ui-select tests', function() {
2213
2213
2214
2214
expect ( el . scope ( ) . $select . multiple ) . toBe ( true ) ;
2215
2215
} ) ;
2216
+
2217
+ it ( 'should preserve the model if tagging is enabled on select multiple' , function ( ) {
2218
+ scope . selection . selectedMultiple = [ "I am not on the list of choices" ] ;
2219
+
2220
+ var el = compileTemplate (
2221
+ '<ui-select multiple="multiple" tagging ng-model="selection.selectedMultiple" theme="bootstrap" style="width: 800px;"> \
2222
+ <ui-select-match placeholder="Pick one...">{{$item.name}} <{{$item.email}}></ui-select-match> \
2223
+ <ui-select-choices repeat="person.email as person in people | filter: $select.search"> \
2224
+ <div ng-bind-html="person.name | highlight: $select.search"></div> \
2225
+ <div ng-bind-html="person.email | highlight: $select.search"></div> \
2226
+ </ui-select-choices> \
2227
+ </ui-select> \
2228
+ '
2229
+ ) ;
2230
+
2231
+ scope . $digest ( ) ;
2232
+
2233
+ expect ( scope . selection . selectedMultiple )
2234
+ . toEqual ( [ "I am not on the list of choices" ] ) ;
2235
+ } ) ;
2216
2236
2217
2237
it ( 'should not call tagging function needlessly' , function ( ) {
2218
2238
scope . slowTaggingFunc = function ( name ) {
You can’t perform that action at this time.
0 commit comments