ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Placing ion-label inside ion-grid in an ion-item fails to render the entire grid

Open vijquick opened this issue 10 years ago • 7 comments

If you have a ion-grid inside ion-item and placing ion-label together with some other components inside ion-grid is causing issue with rendering the entire grid.

Here is a post that I have created in ionic forum.

Below is the markup from that post

<ion-list>
    <ion-item  *ngFor="let order of orders">
      <ion-grid>
        <ion-row>
          <ion-col>
            <ion-icon name="pie" item-left></ion-icon>
          </ion-col>
          <ion-col>
            <ion-label>{{order.number}}</ion-label>
            <ion-label>{{order.quantity}}</ion-label>
          </ion-col>
          <ion-col>
            <ion-label>{{order.productType}}</ion-label>
            <ion-label>
              <ion-icon name="calendar"></ion-icon>{{order.date}}</ion-label>
          </ion-col>
        </ion-row>
      </ion-grid>
    </ion-item>
  </ion-list>

As @brandyscarney pointed out in another post regarding ion-item, it is actually ion-label that is actually causing the issue, and also pointed out that this issue could be something to do with issue in content projection of angular 2.

vijquick avatar Jun 11 '16 03:06 vijquick

Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!

jgw96 avatar Jun 13 '16 20:06 jgw96

Hello @jgw96

Here is the plunker showing the issue. Please check home.html

Regards Vijay

vijquick avatar Jun 15 '16 08:06 vijquick

Hello @vijquick just to update you on what ive found. After some testing this looks to be a content projection issue. It looks like the ion-grid never even gets rendered, which points me towards content projection.

jgw96 avatar Jun 20 '16 19:06 jgw96

Hello @vijquick, after discussing this with my teammates it seems to be partly by design, and partly an angular issue that this does not work. As a workaround for this i would recommend not using ion-grid and just use css to do your layout. Sorry that i could not give you a better answer, and thanks for using Ionic!

jgw96 avatar Jun 20 '16 21:06 jgw96

I think this is still an issue with RC3. Will use the suggestion above.

tej-rana avatar Dec 15 '16 20:12 tej-rana

avoiding the ion-grid is the best solution

praveenNT-Dev avatar Oct 23 '17 12:10 praveenNT-Dev

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 01 '18 20:09 ionitron-bot[bot]