mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 02:16:08 +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,18 +333,16 @@ function AllErrors(): JSX.Element {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const onChangeHandler: TableProps<Exception>['onChange'] = (
|
const onChangeHandler: TableProps<Exception>['onChange'] = useCallback(
|
||||||
paginations,
|
(paginations, filters, sorter) => {
|
||||||
filters,
|
|
||||||
sorter,
|
|
||||||
) => {
|
|
||||||
if (!Array.isArray(sorter)) {
|
if (!Array.isArray(sorter)) {
|
||||||
const { pageSize = 0, current = 0 } = paginations;
|
const { pageSize = 0, current = 0 } = paginations;
|
||||||
const { columnKey = '', order } = sorter;
|
const { columnKey = '', order } = sorter;
|
||||||
const updatedOrder = order === 'ascend' ? 'ascending' : 'descending';
|
const updatedOrder = order === 'ascend' ? 'ascending' : 'descending';
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
const { exceptionType, serviceName } = extractFilterValues(filters, {
|
const { exceptionType, serviceName } = extractFilterValues(filters, {
|
||||||
serviceName: getUpdatedServiceName,
|
serviceName: getFilterString(params.get(urlKey.serviceName)),
|
||||||
exceptionType: getUpdatedExceptionType,
|
exceptionType: getFilterString(params.get(urlKey.exceptionType)),
|
||||||
});
|
});
|
||||||
history.replace(
|
history.replace(
|
||||||
`${pathname}?${createQueryParams({
|
`${pathname}?${createQueryParams({
|
||||||
@ -357,7 +355,9 @@ function AllErrors(): JSX.Element {
|
|||||||
})}`,
|
})}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
[pathname],
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
|
Loading…
x
Reference in New Issue
Block a user