diff --git a/src/@ionic-native/plugins/wheel-selector/index.ts b/src/@ionic-native/plugins/wheel-selector/index.ts index 2958f02db..b97a9d326 100644 --- a/src/@ionic-native/plugins/wheel-selector/index.ts +++ b/src/@ionic-native/plugins/wheel-selector/index.ts @@ -5,6 +5,11 @@ export interface WheelSelectorItem { description?: string; } +export interface DefaultItem { + index: number; + value: string; +} + export interface WheelSelectorOptions { /** * The title of the selector's input box @@ -17,9 +22,9 @@ export interface WheelSelectorOptions { items: Array>; /** - * Which items to display by default, example ["2","Apple"] (if items.length is 2 for instance) + * Which items to display by default. */ - defaultItems?: Array; + defaultItems?: Array; /** * The 'ok' button text @@ -127,9 +132,9 @@ export interface WheelSelectorData { * positiveButtonText: "Ok", * negativeButtonText: "Nope", * defaultItems: [ - * this.jsonData.numbers[2], // '3' - * this.jsonData.fruits[3] // 'Banana' - * ] + * {index:0, value: this.jsonData.numbers[2].description}, + * {index: 1, value: this.jsonData.fruits[3].description} + * ] * }).then( * result => { * console.log(result[0].description + ' ' + result[1].description); @@ -150,8 +155,8 @@ export interface WheelSelectorData { * ], * displayKey: 'name', * defaultItems: [ - * this.jsonData.firstNames[2], - * this.jsonData.lastNames[3] + * {index:0, value: this.jsonData.firstNames[2].name}, + * {index: 0, value: this.jsonData.lastNames[3].name} * ] * }).then( * result => {