ion-item with a floating ion-label breaks when adding an icon
See original GitHub issueNot sure if this is an ionic 2 issue or ionic-conference-app issue
If I add a left/right icons to an ion-item everything works fine
<ion-item>
<ion-icon name="leaf" item-left primary></ion-icon>
<ion-input type="text" placeholder="First Name"></ion-input>
<ion-icon name="arrow-forward" item-right primary></ion-icon>
</ion-item>
If I add a left/right icons to an ion-item with a floating label, it breaks
<ion-item>
<ion-icon name="leaf" item-left primary></ion-icon>
<ion-label floating primary>First Name</ion-label>
<ion-input type="text"></ion-input>
<ion-icon name="arrow-forward" item-right primary></ion-icon>
</ion-item>
If this is by design, can you help me find a solution?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Icons and Floating Inputs: Ionic - Prototype A - WordPress.com
Hi all, i stuck on mixing an `ion-icon` with an `floating label` like in this the *Angular Material Bootstrap Inputs Demo* ...
Read more >ion-item - Ionic Framework
Items are elements that can contain text, icons, avatars, images, inputs, and any other native or custom elements. Generally they are placed in...
Read more >Ionic 2: Input with Icon-Label - Stack Overflow
I had to use an icon and input element in separate fields of a row.. within a table..
Read more >Ionic List | Learn How List Components Work in Ionic? - eduCBA
Interactive Items with the sliding feature can be achieved using the ion-item-sliding attribute. Ion-item-sliding tag should always be a child element of ion- ......
Read more >5 Examples of the new Ionic 6 Bottom Sheet Modal
Get the details on how to use the brand new Ionic Bottom Sheet component in this ... <ion-label>People</ion-label> </ion-item> <ion-list ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Haha thanks. 😄
Yes, this is an ionic issue. I got around it for demo purposes by using
absolute
positioning on the icons:https://github.com/driftyco/ionic/blob/2.0/demos/label/main.html#L15-L20 https://github.com/driftyco/ionic/blob/2.0/demos/label/main.html#L58-L68
This issue will resolve it: https://github.com/driftyco/ionic/issues/5319