glide-data-grid icon indicating copy to clipboard operation
glide-data-grid copied to clipboard

Whether the header allows line breaks

Open Progentalwf opened this issue 1 year ago • 3 comments

const columns = [ { title: "AAAA\nBBBB", allowWrapping: true, }, ... ]

Progentalwf avatar Mar 22 '24 08:03 Progentalwf

I agree it would be nice if somehow the header text could be wrapped, and in a controllable way.

Also would be good if the headers could take a contentAlign or something to allow the text to be center or right aligned.

A-Posthuman avatar Apr 20 '24 15:04 A-Posthuman

@Progentalwf Did u find solution?

portare avatar Jun 20 '24 19:06 portare

For contentAlign, you can implement that yourself using drawHeader API. Would love if the default drawHeader did support that field though. Text wrapping is a bit harder, just because headerHeight exists as an API already; I haven't dug into how allowWrapping in TextCells interact with rowHeight since that's a similar behavior.

BrianHung avatar Jun 23 '24 03:06 BrianHung