on trie les elements du select en tenant compte si c'est un entier ou string
This commit is contained in:
parent
e93783a6af
commit
440d01fcf3
2 changed files with 35 additions and 2 deletions
|
@ -640,6 +640,21 @@ let monTableau = {
|
|||
changerVue(vue) {
|
||||
this.quelleVue = vue;
|
||||
},
|
||||
ordonnerSelect(a, b) {
|
||||
if (Number.isInteger(a) && Number.isInteger(b)) {
|
||||
return a - b;
|
||||
} else {
|
||||
let x = a.toLowerCase();
|
||||
let y = b.toLowerCase();
|
||||
if (x < y) {
|
||||
return -1;
|
||||
}
|
||||
if (x > y) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="gamutable">
|
||||
|
@ -720,7 +735,7 @@ let monTableau = {
|
|||
<vue-select
|
||||
v-if="filtreColType[head] === 'select'"
|
||||
v-model="filtreColSelected[head]"
|
||||
:options="filtreColVal[head]"
|
||||
:options="filtreColVal[head].sort(ordonnerSelect)"
|
||||
:visible-options="filtreColVal_visible[head]"
|
||||
hide-selected
|
||||
multiple
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue