简体   繁体   中英

Show ellipsis(...) when data exceeds the column width in ngx-datatable

I am using ngx-datatable with Angular ( https://swimlane.github.io/ngx-datatable/ ). Currently, my text gets cut when the data exceeds the column width. So, I want to show ellipsis and moreover, when user hovers over the ellipsis or the data, it should show the full details. Any help would be appreciated. trimmed text

Well, as long as it's the same DOM structure in the example link you provided just add this CSS somewhere;

.datatable-body-cell-label {
   white-space: nowrap;
   text-overflow: ellipsis;
   overflow: hidden;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM