Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I show two ion-col field inside ion-item section in IONIC 3

I need to show two input field inside a row look like:

enter image description here

But when I use :

<ion-list>
<ion-item>
  <ion-label stacked> Phone Number</ion-label>
  <ion-grid>
    <ion-row>
      <ion-col>
        <ion-input type="tel" placeholder="Area code"></ion-input>
      </ion-col>
      <ion-col>
        <ion-input type="tel" placeholder="Number"></ion-input>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-item>

But it not show any thing screen like:

enter image description here

Please help me.

like image 321
Neotrixs Avatar asked Nov 21 '25 09:11

Neotrixs


1 Answers

Please try to add ion-row before the ion-item. I hope this may help you. Thanks

<ion-list>

  <ion-label stacked> Phone Number</ion-label>

    <ion-row>
    <ion-item col-6>
        <ion-input type="tel" placeholder="Area code"></ion-input>
    </ion-item>
    <ion-item col-6>
        <ion-input type="tel" placeholder="Number"></ion-input>
    </ion-item>
    </ion-row>

</ion-list>
like image 183
Saalim Mohammad Avatar answered Nov 23 '25 00:11

Saalim Mohammad