question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ellipsis dont show on overflow

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior When the data of a column overflows it truncates the data

Expected behavior the CSS on the column has this overflow: hidden; white-space: nowrap; text-overflow: ellipsis; So i would assume i would see an ellipsis.

Reproduction of the problem I believe this is the issue: datatable-body-cell has the style above, then <div class="datatable-body-cell-label"> has a slightly smaller size. then finally we have a span that overflows.
Therefore due to the extra layer between the style and the overflow content we dont get the ellipsis.

What is the motivation / use case for changing the behavior? Want the user to know they are not seeing all the content. Or if you can wrap the text I would be good with this option too.

Please tell us about your environment: na

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
tmburnellcommented, Jun 9, 2017

Below is what I used to fix the issue in my project … However it has side effects that might not be wanted by some users. So I did not plan on making a PR. As you can see in this screen shot the sort arrow gets pushed to the end of the cell instead of being next to the word. I am not sure you can have both (the sort arrow next to the word and the ellipsis. So maybe we add a class to make them work but you have to flag you want it. image

ngx-datatable.material {
    // fix ellipsis on header
    datatable-header-cell {
	* {
	    width: 100%
	}

	span {
	    display: inline-block;

	    span {
		display: inline-block;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	    }
	}
    }
	
    // fix ellipsis on cells
    .datatable-body-cell-label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	width: 100%;
    }
}
1reaction
amcdnlcommented, Mar 27, 2017

@tmburnell - make a PR plz.

Read more comments on GitHub >

github_iconTop Results From Across the Web

text-overflow: ellipsis not working
Ellipsis cannot be calculated in display:inline element (span's default.) See this text overflow not working tutorial for implementation.
Read more >
Why CSS text-overflow: ellipsis not working ? | by surbhi soni
Well I have solution for that it only works when the following properties combined together. “Why CSS text-overflow: ellipsis not working ?
Read more >
CSS text-overflow ellipsis not Working - Linux Hint
In CSS, the text-overflow property can be assigned the value ellipsis. But it won't work alone. The ellipsis works on the element that's...
Read more >
text-overflow - CSS: Cascading Style Sheets - MDN Web Docs
The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis (' …
Read more >
CSS text-overflow property - W3Schools
The text-overflow property specifies how overflowed content that is not displayed should be signaled to the user. It can be clipped, display an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found