fix(select): remove relative positioning and get options in correct order

This commit is contained in:
Brandy Carney
2018-02-28 15:57:28 -05:00
parent ec994dd56b
commit d78aa36320
2 changed files with 2 additions and 3 deletions

View File

@ -4,8 +4,6 @@
// --------------------------------------------------
ion-select {
position: relative;
display: flex;
overflow: hidden;
@ -41,6 +39,7 @@ ion-select {
white-space: nowrap;
}
// TODO item needs this class
.item-multiple-inputs ion-select {
position: relative;
}

View File

@ -189,7 +189,7 @@ export class Select {
@Listen('ionSelectOptionDidLoad')
optLoad(ev: HTMLIonSelectOptionElementEvent) {
const selectOption = ev.target;
this.childOpts.push(selectOption);
this.childOpts = Array.from(this.el.querySelectorAll('ion-select-option'));
if (this.value !== undefined && (Array.isArray(this.value) && this.value.indexOf(selectOption.value) > -1) || (selectOption.value === this.value)) {
// this select has a value and this