Item-text-wrap in Ionic 2?

Is there anything in Ionic 2 for the CSS class center-container as yet?

This was extremely helpful for wrapping things in divs and other items in Ionic 1.

I can’t seem to find anything, I want this. Doing it manually by css jynxes scrolling when the entire content fits in screen.

Second google result:

use

        <iion-item text-wrap></ion-item>
3 Likes

Just to add to this, all you need to add is text-wrap to the item.

11 Likes

Thanks tho.

It would be nice to have this in the Docs. What can I do to help it?

PLUS:

If you put text-wrap in a ion-list, all items in that list will have the text-wrap effect applied. This way you dont need to put the text-wrap directive in all items and making your app slightly optimized! :yum:

3 Likes

Hi, how do this in ion-title?

example:
<ion-header>
  <ion-navbar>
    <ion-title text-wrap>text text text text text text text text text text text text ?</ion-title>
  </ion-navbar>
</ion-header>

This is not intended for ion-title

iOS and android both cut the title off if it is too long.
Ionic follows this since it is a common design pattern.

1 Like

Thank you for the answer.
Exist a workaround for this?

There is nothing to workaround.
This is done by design.

1 Like

Apologies on reviving an already revived topic but;

can text-wrap be used in the options of a ionic-select or is there something similar to achieve multi-line selects?

3 Likes