mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-18 03:35:57 +08:00
fix: sorter is updated for sorting in alerts page (#2818)
This commit is contained in:
parent
c69e2e0d50
commit
9091b9b82c
@ -100,9 +100,12 @@ function ListAlert({ allAlertRules, refetch }: ListAlertProps): JSX.Element {
|
|||||||
dataIndex: 'alert',
|
dataIndex: 'alert',
|
||||||
width: 100,
|
width: 100,
|
||||||
key: 'name',
|
key: 'name',
|
||||||
sorter: (a, b): number =>
|
sorter: (alertA, alertB): number => {
|
||||||
(a.alert ? a.alert.charCodeAt(0) : 1000) -
|
if (alertA.alert && alertB.alert) {
|
||||||
(b.alert ? b.alert.charCodeAt(0) : 1000),
|
return alertA.alert.localeCompare(alertB.alert);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
render: (value, record): JSX.Element => (
|
render: (value, record): JSX.Element => (
|
||||||
<Typography.Link onClick={(): void => onEditHandler(record)}>
|
<Typography.Link onClick={(): void => onEditHandler(record)}>
|
||||||
{value}
|
{value}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user