feat: onClick is updated (#1732)

Co-authored-by: Pranay Prateek <pranay@signoz.io>
This commit is contained in:
Palash Gupta 2022-11-21 16:44:41 +05:30 committed by GitHub
parent db105af89f
commit 4a244ad7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import Table, { ColumnsType } from 'antd/lib/table';
import ROUTES from 'constants/routes';
import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration';
import history from 'lib/history';
import omit from 'lodash-es/omit';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
@ -194,7 +195,11 @@ function TraceTable(): JSX.Element {
onClick: (event): void => {
event.preventDefault();
event.stopPropagation();
window.open(getLink(record));
if (event.metaKey || event.ctrlKey) {
window.open(getLink(record), '_blank');
} else {
history.push(getLink(record));
}
},
})}
pagination={{