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 {
148148 }
149149 let events = {
150150 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
152153 })(field .id )
153154 }
154155
@@ -224,7 +225,7 @@ export default {
224225 continue
225226 }
226227 let array = selected[field .id ]
227- let str = multiple .arrayToStr (this . sort ( array) , field)
228+ let str = multiple .arrayToStr (array, field)
228229 if (str === null ){
229230 this .error = ' invalid selection'
230231 return
@@ -233,12 +234,6 @@ export default {
233234 }
234235 this .error = ' '
235236 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
242237 }
243238 }
244239}
You can’t perform that action at this time.
0 commit comments