Components: I want to show md-tooltip on a text element when the length of text exceeds specific length.

Created on 9 Mar 2017  路  5Comments  路  Source: angular/components

Bug, feature request, or proposal:

I want to show dotted end text with fixed length but with tooltip when it exceeds specific text length.

Most helpful comment

.mat-tooltip {
  max-width: 50px;
  /* or */
  /* width: 50px; */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

All 5 comments

.mat-tooltip {
  max-width: 50px;
  /* or */
  /* width: 50px; */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

looks good.

also can we show material2 tooltip conditionally?

because now it seems to be an attribute of element.

https://github.com/angular/material2/blob/master/src/demo-app/tooltip/tooltip-demo.html
you can call show on it as long as it as bound I believe. tooltip.show()

3578 will add in the ability to enable/disable the tooltip.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Miiekeee picture Miiekeee  路  3Comments

theunreal picture theunreal  路  3Comments

alanpurple picture alanpurple  路  3Comments

3mp3ri0r picture 3mp3ri0r  路  3Comments

MurhafSousli picture MurhafSousli  路  3Comments