ion-picker can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the Picker.
The isOpen property on ion-picker allows developers to control the presentation state of the Picker from their application state. This means when isOpen is set to true the Picker will be presented, and when isOpen is set to false the Picker will be dismissed.
isOpen uses a one-way data binding, meaning it will not automatically be set to false when the Picker is dismissed. Developers should listen for the ionPickerDidDismiss or didDismiss event and set isOpen to false. The reason for this is it prevents the internals of ion-picker from being tightly coupled with the state of the application. With a one way data binding, the Picker only needs to concern itself with the boolean value that the reactive variable provides. With a two way data binding, the Picker needs to concern itself with both the boolean value as well as the existence of the reactive variable itself. This can lead to non-deterministic behaviors and make applications harder to debug.
interfacePickerColumn{ name:string; align?:string; /** * Changing this value allows the initial value of a picker column to be set. */ selectedIndex?:number; prevSelected?:number; prefix?:string; suffix?:string; options:PickerColumnOption[]; cssClass?:string|string[]; columnWidth?:string; prefixWidth?:string; suffixWidth?:string; optionsWidth?:string; }
interfacePickerColumnOption{ text?:string; value?:any; disabled?:boolean; duration?:number; transform?:string; selected?:boolean; /** * The optional text to assign as the aria-label on the picker column option. */ ariaLabel?:string; }
If true, the picker will open. If false, the picker will close. Use this if you need finer grained control over presentation, otherwise just use the pickerController or the trigger property. Note: isOpen will not automatically be set back to false when the picker dismisses. You will need to do that in your code.