File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1903,6 +1903,22 @@ describe('Multiselect.vue', () => {
1903
1903
expect ( vm . $children [ 0 ] . filteredOptions ) . to . deep . equal ( [ { isTag : true , label : '1' } , 10 ] )
1904
1904
expect ( vm . $children [ 0 ] . filteredOptions . length ) . to . equal ( 2 )
1905
1905
} )
1906
+
1907
+ it ( 'should not alter the available options when :local-search is FALSE' , ( ) => {
1908
+ const vm = new Vue ( {
1909
+ template : '<multiselect :selected="value" :options="source" :multiple="true" :local-search="false"></multiselect>' ,
1910
+ components : { Multiselect } ,
1911
+ data : {
1912
+ value : [ ] ,
1913
+ source : [ 10 , 20 , 30 ]
1914
+ }
1915
+ } ) . $mount ( )
1916
+ expect ( vm . $children [ 0 ] . filteredOptions ) . to . deep . equal ( [ 10 , 20 , 30 ] )
1917
+ expect ( vm . $children [ 0 ] . filteredOptions . length ) . to . equal ( 3 )
1918
+ vm . $children [ 0 ] . search = 'test'
1919
+ expect ( vm . $children [ 0 ] . filteredOptions ) . to . deep . equal ( [ 10 , 20 , 30 ] )
1920
+ expect ( vm . $children [ 0 ] . filteredOptions . length ) . to . equal ( 3 )
1921
+ } )
1906
1922
} )
1907
1923
1908
1924
describe ( '#onTag' , ( ) => {
You can’t perform that action at this time.
0 commit comments