Skip to content

Commit

Permalink
Fix datagrid issue in Discover for Firefox (#90906)
Browse files Browse the repository at this point in the history
* Fix datagrid issue in Discover for Firefox
* small visual cleanup while im in here
  • Loading branch information
snide authored Feb 11, 2021
1 parent 12a06da commit facdd55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
border-bottom: $euiBorderThin;
}

.euiDataGridRowCell.euiDataGridRowCell--firstColumn {
border-left: none;
}

.euiDataGridRowCell.euiDataGridRowCell--lastColumn {
border-right: none;
}

.euiDataGridRowCell:first-of-type,
.euiDataGrid--headerShade.euiDataGrid--bordersAll .euiDataGridHeaderCell:first-of-type {
border-left: none;
Expand Down Expand Up @@ -66,3 +74,7 @@
.dscFormatSource {
@include euiTextTruncate;
}

.dscDiscoverGrid__descriptionListDescription {
word-break: normal !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Discover grid cell rendering', function () {
/>
);
expect(component.html()).toMatchInlineSnapshot(
`"<dl class=\\"euiDescriptionList euiDescriptionList--inline euiDescriptionList--compressed\\"><dt class=\\"euiDescriptionList__title\\">bytes</dt><dd class=\\"euiDescriptionList__description\\">100</dd></dl>"`
`"<dl class=\\"euiDescriptionList euiDescriptionList--inline euiDescriptionList--compressed dscDiscoverGrid__descriptionList\\"><dt class=\\"euiDescriptionList__title\\">bytes</dt><dd class=\\"euiDescriptionList__description dscDiscoverGrid__descriptionListDescription\\">100</dd></dl>"`
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ export const getRenderCellValueFn = (
const formatted = indexPattern.formatHit(row);

return (
<EuiDescriptionList type="inline" compressed>
<EuiDescriptionList type="inline" compressed className="dscDiscoverGrid__descriptionList">
{Object.keys(formatted).map((key) => (
<Fragment key={key}>
<EuiDescriptionListTitle>{key}</EuiDescriptionListTitle>
<EuiDescriptionListDescription dangerouslySetInnerHTML={{ __html: formatted[key] }} />
<EuiDescriptionListDescription
dangerouslySetInnerHTML={{ __html: formatted[key] }}
className="dscDiscoverGrid__descriptionListDescription"
/>
</Fragment>
))}
</EuiDescriptionList>
Expand Down

0 comments on commit facdd55

Please sign in to comment.