Skip to content

Commit

Permalink
Display dash "-" instead of blank space when no updatedAt value
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed May 18, 2022
1 parent a0fbd2e commit 2dae9f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe('TableListView', () => {
expect(tableCellsValues).toEqual([
['Item 2', 'Item 2 description', 'yesterday'],
['Item 1', 'Item 1 description', '2 days ago'],
['Item 3', 'Item 3 description', ''], // Empty column as no updatedAt provided
['Item 3', 'Item 3 description', '-'], // Empty column as no updatedAt provided
]);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,15 @@ class TableListView<V extends {}> extends React.Component<
if (this.state.hasUpdatedAtMetadata) {
const renderUpdatedAt = (dateTime?: string) => {
if (!dateTime) {
return <span />;
return (
<EuiToolTip
content={i18n.translate('kibana-react.tableListView.updatedDateUnknownLabel', {
defaultMessage: 'Updated date unknown',
})}
>
<span>-</span>
</EuiToolTip>
);
}
const updatedAt = moment(dateTime);

Expand Down

0 comments on commit 2dae9f0

Please sign in to comment.