[Lens] Render newlines in data table#134441
Conversation
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Left one comment for your review, @flash1293. Thanks!
x-pack/plugins/lens/public/datatable_visualization/components/table_basic.scss
Outdated
Show resolved
Hide resolved
mbondyra
left a comment
There was a problem hiding this comment.
Other than comment from Michael, nothing else to add. Great PR 🙌🏼
| dangerouslySetInnerHTML={{ __html: content }} // eslint-disable-line react/no-danger | ||
| data-test-subj="lnsTableCellContent" | ||
| className={`lnsTableCell--${currentAlignment}`} | ||
| className={classNames({ |
There was a problem hiding this comment.
What if we remove x-pack/plugins/lens/public/datatable_visualization/components/table_basic.scss in favor of using the emotion/css ?
I see we just need to set text-align, white-space and height styles
There was a problem hiding this comment.
Makes sense, I would like to split it out into a separate PR though - I will add it to our tech debt list
…table_basic.scss Co-authored-by: Michael Marcialis <michael@marcial.is>
|
@MichaelMarcialis adjusted, thanks! |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Thanks for making that change, @flash1293. LGTM!
Fixes #76242
This PR sets
white-space: pre;to the grid cell if row auto-height is used:default

One thing to note - the newlines are not rendered for custom row height:

If that turns out to be a common use case, we could add more granular control later on (e.g. on a per-column basis)