mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 22:45: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',
|
||||
width: 100,
|
||||
key: 'name',
|
||||
sorter: (a, b): number =>
|
||||
(a.alert ? a.alert.charCodeAt(0) : 1000) -
|
||||
(b.alert ? b.alert.charCodeAt(0) : 1000),
|
||||
sorter: (alertA, alertB): number => {
|
||||
if (alertA.alert && alertB.alert) {
|
||||
return alertA.alert.localeCompare(alertB.alert);
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
render: (value, record): JSX.Element => (
|
||||
<Typography.Link onClick={(): void => onEditHandler(record)}>
|
||||
{value}
|
||||
|
Loading…
x
Reference in New Issue
Block a user