Skip to content

Commit

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

fixes opensearch-project#7177

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

* Changeset file for PR opensearch-project#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>
  • Loading branch information
2 people authored and Qxisylolo committed Aug 1, 2024
1 parent 270240a commit ab2cf25
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 ab2cf25

Please sign in to comment.