mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(picker): selectionIndex always initialized
This commit is contained in:
@@ -563,6 +563,7 @@ export class DateTime extends Ion implements AfterContentInit, ControlValueAcces
|
||||
|
||||
let column: PickerColumn = {
|
||||
name: key,
|
||||
selectedIndex: 0,
|
||||
options: values.map(val => {
|
||||
return {
|
||||
value: val,
|
||||
|
||||
@@ -512,7 +512,7 @@ export class PickerCmp {
|
||||
if (!isPresent(column.options)) {
|
||||
column.options = [];
|
||||
}
|
||||
|
||||
column.selectedIndex = 0;
|
||||
column.options = column.options.map(inputOpt => {
|
||||
let opt: PickerColumnOption = {
|
||||
text: '',
|
||||
|
||||
Reference in New Issue
Block a user