File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,8 @@ export default {
148
148
}
149
149
let events = {
150
150
input: ((fieldId ) => (evt ) => {
151
- this .selected [fieldId] = evt
151
+ const selected = Array .from (evt).sort ((a , b ) => { return a > b ? 1 : - 1 })
152
+ this .selected [fieldId] = selected
152
153
})(field .id )
153
154
}
154
155
@@ -224,7 +225,7 @@ export default {
224
225
continue
225
226
}
226
227
let array = selected[field .id ]
227
- let str = multiple .arrayToStr (this . sort ( array) , field)
228
+ let str = multiple .arrayToStr (array, field)
228
229
if (str === null ){
229
230
this .error = ' invalid selection'
230
231
return
@@ -233,12 +234,6 @@ export default {
233
234
}
234
235
this .error = ' '
235
236
this .$emit (' input' , strings .join (' ' ))
236
- },
237
-
238
- sort (array ){
239
- let a = array .slice ()
240
- a .sort ((a ,b ) => a- b)
241
- return a
242
237
}
243
238
}
244
239
}
You can’t perform that action at this time.
0 commit comments