Skip to content

bug: IonLabel text-wrap broken #28825

Closed as not planned
Closed as not planned

Description

@chrissmejia

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

text-wrap doesn't work

Expected Behavior

text-wrap to work

Steps to Reproduce

Compare v6 with v7 on the official docs:

https://ionicframework.com/docs/v6/api/label
Screenshot 2024-01-13 at 12 14 59

https://ionicframework.com/docs/api/label
Screenshot 2024-01-13 at 12 15 25

Code Reproduction URL

No response

Ionic Info

Same as in the docs, I'm personally having the same issue on "@ionic/vue": "^7.6.3" ant patched on my side, but leaving this here to improve the framework.

Additional Information

I'm migrating from 6.x to 7.x, 6.x was fine.

Activity

  1. self-assigned this
    on Jan 15, 2024
  2. mapsandapps commented on Jan 15, 2024

    @mapsandapps
    Contributor

    Hi, we changed the default text wrapping of a Label within an Item in 7.6.0 (changelog). To have a Label truncate with an ellipsis, you can add the "ion-text-nowrap" class. E.g.

    <ion-item>
      <ion-label class="ion-text-nowrap">
        Multi-line text that should ellipsis when it is too long to fit on one line. Lorem ipsum dolor sit amet,
          consectetur adipiscing elit.
      </ion-label>
    </ion-item>
    

    I'll update the docs to apply this class where relevant. Thanks for pointing out that the docs are incorrect!

  3. removed their assignment
    on Jan 15, 2024
  4. ionitron-bot commented on Feb 14, 2024

    @ionitron-bot

    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.

  5. locked and limited conversation to collaborators on Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions