raychenfj / ion-multi-picker

Multi Item Picker - An Ionic Custom Multi Picker Component
https://raychenfj.github.io/ion-multi-picker/
Other
236 stars 103 forks source link

Default value for the picker #66

Closed tharinduc closed 7 years ago

tharinduc commented 7 years ago

Hello

Can I give a default value to this picker?

raychenfj commented 7 years ago

Hi @Simplelenz

Just use ngModel to bind a variable with default value

<ion-item>
  <ion-label>Default Value</ion-label>
  <ion-multi-picker id="default" [(ngModel)]="default" item-content [multiPickerColumns]="dependentColumns" [showReset]="true"></ion-multi-picker>
</ion-item>