mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 08:35:54 +08:00
fix: exception filter clear (#1936)
This commit is contained in:
parent
d1ee15c372
commit
46e131698e
@ -138,10 +138,10 @@ function AllErrors(): JSX.Element {
|
|||||||
filterKey: string,
|
filterKey: string,
|
||||||
): VoidFunction => (): void => {
|
): VoidFunction => (): void => {
|
||||||
const { exceptionFilterValue, serviceFilterValue } = getFilterValues(
|
const { exceptionFilterValue, serviceFilterValue } = getFilterValues(
|
||||||
getUpdatedServiceName,
|
getUpdatedServiceName || '',
|
||||||
getUpdatedExceptionType,
|
getUpdatedExceptionType || '',
|
||||||
filterKey,
|
filterKey,
|
||||||
filterValue,
|
filterValue || '',
|
||||||
);
|
);
|
||||||
history.replace(
|
history.replace(
|
||||||
`${pathname}?${createQueryParams({
|
`${pathname}?${createQueryParams({
|
||||||
@ -333,31 +333,31 @@ function AllErrors(): JSX.Element {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const onChangeHandler: TableProps<Exception>['onChange'] = (
|
const onChangeHandler: TableProps<Exception>['onChange'] = useCallback(
|
||||||
paginations,
|
(paginations, filters, sorter) => {
|
||||||
filters,
|
if (!Array.isArray(sorter)) {
|
||||||
sorter,
|
const { pageSize = 0, current = 0 } = paginations;
|
||||||
) => {
|
const { columnKey = '', order } = sorter;
|
||||||
if (!Array.isArray(sorter)) {
|
const updatedOrder = order === 'ascend' ? 'ascending' : 'descending';
|
||||||
const { pageSize = 0, current = 0 } = paginations;
|
const params = new URLSearchParams(window.location.search);
|
||||||
const { columnKey = '', order } = sorter;
|
const { exceptionType, serviceName } = extractFilterValues(filters, {
|
||||||
const updatedOrder = order === 'ascend' ? 'ascending' : 'descending';
|
serviceName: getFilterString(params.get(urlKey.serviceName)),
|
||||||
const { exceptionType, serviceName } = extractFilterValues(filters, {
|
exceptionType: getFilterString(params.get(urlKey.exceptionType)),
|
||||||
serviceName: getUpdatedServiceName,
|
});
|
||||||
exceptionType: getUpdatedExceptionType,
|
history.replace(
|
||||||
});
|
`${pathname}?${createQueryParams({
|
||||||
history.replace(
|
order: updatedOrder,
|
||||||
`${pathname}?${createQueryParams({
|
offset: (current - 1) * pageSize,
|
||||||
order: updatedOrder,
|
orderParam: columnKey,
|
||||||
offset: (current - 1) * pageSize,
|
pageSize,
|
||||||
orderParam: columnKey,
|
exceptionType,
|
||||||
pageSize,
|
serviceName,
|
||||||
exceptionType,
|
})}`,
|
||||||
serviceName,
|
);
|
||||||
})}`,
|
}
|
||||||
);
|
},
|
||||||
}
|
[pathname],
|
||||||
};
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
|
Loading…
x
Reference in New Issue
Block a user