<b-table> Truncate text with ellipsis alternatively instead of text-wrap
See original GitHub issueIs your feature request related to a problem? Please describe…
When b-tables
width gets crunched together the text wraps into new lines. In cases where there is no much horizontal space left this isn´t ideal and sometimes looks a bit weird.
Describe the solution you’d like
I would like the text inside b-table cells to be truncated with an ellipsis like the following if it does not fit in one row:
This text fits This text is to long and…
Additional context
I got the idea from @alexsasharegan tweet on twitter.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to wrap or truncate long strings in a Material-UI ...
noWrap: If true, the text will not wrap, but instead will truncate with a text overflow ellipsis. Note that text overflow can only...
Read more >Truncate String with Ellipsis - CSS-Tricks
Hey – would anyone know how to do this with a full word? I've seen text-overflow:ellipsis-word used a couple times but haven't been...
Read more >How To Fix Text-Overflow Ellipsis Not Working - Semicolon.dev
A common way to solve ellipsis not working in a table cell is by wrapping cell's content in another HTML element like span,...
Read more >How To Make CSS Ellipsis Work on a Table Cell - W3docs
This tutorial will help you to make CSS ellipsis work on a table cell. To achieve this goal, you can use some CSS...
Read more >Text Wrapping for Long Strings in Text Tables - Knowledge Base
How to enable text wrapping for long String fields in a text table in Tableau ... but my long strings are getting truncated...
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
@ddweber @tmorehouse I ran into the same issue and simply fixed it by adding this css:
The
max-width: 1px;
does the trick here. Maybe this could be added to the documentation?I was able to get tet to truncate using the
fixed
table prop, and then using an item scoped slot:Where the someField value is a very long text string.
Unfortunately the
fixed
prop of table makes each column roughly equal width.I tried playing with the colgroup width method and couldn’t get it working (although the colgroup slot was working)