Skip to content

Commit

Permalink
fix(discover): break new lines in table cell (#7207)
Browse files Browse the repository at this point in the history
* fix(discover): break new lines in table cell

fixes #7177

Signed-off-by: Joshua Li <[email protected]>

* Changeset file for PR #7207 created/updated

---------

Signed-off-by: Joshua Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 4ff4c3c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 8ee8678 commit f168f11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7207.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Break new lines in table cell in legacy discover ([#7207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7207))
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ $osdDocTableCellPadding: calc($ouiSizeM / 2); // corresponds to DataGrid medium
font-size: inherit !important;
}
}

.osdDocTableCell__dataField {
white-space: pre-wrap;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ const TableCellUI = ({
}: TableCellProps) => {
const content = (
<>
{/* eslint-disable-next-line react/no-danger */}
<span dangerouslySetInnerHTML={{ __html: sanitizedCellValue }} />
<span
className="osdDocTableCell__dataField"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: sanitizedCellValue }}
/>
<span className="osdDocTableCell__filter">
<EuiToolTip
content={i18n.translate('discover.filterForValue', {
Expand Down

0 comments on commit f168f11

Please sign in to comment.