How can I slice a column data while column resizing? #2413
-
The behaviour shown in column resizing example is that when column is resized to a width lower than the width of column data, the value overflows out of the table if it is a single word or it is pushed into a new line if multiple words. E.g.: I would like to slice the column data when the column is resized and column data minimum width exceeds the resized column width. My expectations is sth like: const offset = 3
if(dataMinWidth < columnWidth) {
data = `${data.slice(0, columnWidth-offset)}...`
} Is there a way to pass a function to format data in each column based on a given function (as above)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think a function would be necessary. This can be achieved with good 'ol CSS: overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; You could optionally add a title tag to the |
Beta Was this translation helpful? Give feedback.
I don't think a function would be necessary. This can be achieved with good 'ol CSS:
You could optionally add a title tag to the
td
with the full string so that it can be viewed by a long-hover.