Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 - item-right nested in ion-list-header renders poorly #5561

Closed
danbucholtz opened this issue Feb 22, 2016 · 2 comments
Closed

V2 - item-right nested in ion-list-header renders poorly #5561

danbucholtz opened this issue Feb 22, 2016 · 2 comments
Assignees
Milestone

Comments

@danbucholtz
Copy link
Contributor

Short description of the problem:

When I have an ion-list with a header, if I want to add a button to the right side of the screen using item-right, it doesn't work as expected.

What behavior are you expecting?

I would like it to position the item on the the right the same as ion-item item-right positioning does

<ion item>
   <ion-item-group *ngFor="myItem of items">
      <ion-list-header>
           {{myItem.title}}
           <button item-right clear primary
            <ion-icon class="item-right-larger-button" name="checkmark-circle"></ion-icon>
       </button>
      </ion-list-header>
      <ion-item>blah blah blah</ion-item>
    <ion-item-group>
</ion-item>

Ionic Version: 1.x / 2.x

2.x

Browser & Operating System: iOS / Android / Chrome

Chrome, iOS, Android

Run ionic info from terminal/cmd prompt:

Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v4.2.3
Xcode version: Xcode 7.2.1 Build version 7C1002
@keithdmoore
Copy link
Contributor

keithdmoore commented May 22, 2016

👍 I think this is a fairly common usecase. For example, you have an item divider where you want to place an "add" or "add-circle" icon.

brandyscarney added a commit that referenced this issue Jun 19, 2016
adds ability for list headers and item dividers to use the same content
projection as an item without dynamically adding and removing classes
or using complex css.

references #5561
brandyscarney added a commit that referenced this issue Jun 22, 2016
- `ion-list-header` and `ion-item-divider` now take advantage of the
same content projection as the `ion-item`
- they are still styled as list headers and item dividers
- added docs and demos on this addition

closes #5561
@brandyscarney
Copy link
Member

brandyscarney commented Jun 22, 2016

This has been added and will be possible with beta 10. For example:

<ion-item-divider>
  Item Divider
  <button item-right>button</button>
</ion-item-divider>

<ion-item-divider dark>
  <button item-left clear>
    <ion-icon name="cloudy"></ion-icon>
  </button>
  <button item-left clear light>
    <ion-icon name="rainy"></ion-icon>
  </button>
  Dark
</ion-item-divider>

<ion-list-header>
  <button item-left (click)="testClick($event)">Default</button>
  Inner Buttons
  <button outline item-right (click)="testClick($event)">Outline</button>
</ion-list-header>

<ion-list-header>
  <button item-left (click)="testClick($event)">
    <ion-icon name="home"></ion-icon>
    Left Icon
  </button>
  disabled left icon buttons
  <button outline item-right (click)="testClick($event)">
    <ion-icon name="star"></ion-icon>
    Left Icon
  </button>
</ion-list-header>

Thanks!

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants