Clear/remove filter works
This commit is contained in:
parent
c1813d4ef7
commit
5f6bb4a0f8
|
@ -225,6 +225,7 @@ export default function ProcessInstanceListTable({
|
||||||
// @ts-expect-error TS(7053) FIXME:
|
// @ts-expect-error TS(7053) FIXME:
|
||||||
const functionToCall = parametersToAlwaysFilterBy[paramName];
|
const functionToCall = parametersToAlwaysFilterBy[paramName];
|
||||||
const paramValue = filters[paramName];
|
const paramValue = filters[paramName];
|
||||||
|
functionToCall('');
|
||||||
if (paramValue) {
|
if (paramValue) {
|
||||||
const dateString = convertSecondsToFormattedDate(paramValue as any);
|
const dateString = convertSecondsToFormattedDate(paramValue as any);
|
||||||
functionToCall(dateString);
|
functionToCall(dateString);
|
||||||
|
@ -234,20 +235,19 @@ export default function ProcessInstanceListTable({
|
||||||
|
|
||||||
Object.keys(parametersToGetFromSearchParams).forEach(
|
Object.keys(parametersToGetFromSearchParams).forEach(
|
||||||
(paramName: string) => {
|
(paramName: string) => {
|
||||||
if (
|
if (paramName === 'process_model_identifier') {
|
||||||
paramName === 'process_model_identifier' &&
|
setProcessModelSelection(null);
|
||||||
typeof filters.process_model_identifier === 'string'
|
|
||||||
) {
|
|
||||||
processModelAvailableItems.forEach((item: any) => {
|
processModelAvailableItems.forEach((item: any) => {
|
||||||
if (item.id === filters.process_model_identifier) {
|
if (item.id === filters.process_model_identifier) {
|
||||||
setProcessModelSelection(item);
|
setProcessModelSelection(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (paramName === 'process_status') {
|
||||||
paramName === 'process_status' &&
|
|
||||||
typeof filters.process_status === 'string'
|
|
||||||
) {
|
|
||||||
const processStatusSelectedArray: string[] = [];
|
const processStatusSelectedArray: string[] = [];
|
||||||
|
setProcessStatusSelection(processStatusSelectedArray);
|
||||||
|
if (!filters.process_status) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
PROCESS_STATUSES.forEach((processStatusOption: any) => {
|
PROCESS_STATUSES.forEach((processStatusOption: any) => {
|
||||||
const regex = new RegExp(`\\b${processStatusOption}\\b`);
|
const regex = new RegExp(`\\b${processStatusOption}\\b`);
|
||||||
if (filters.process_status.match(regex)) {
|
if (filters.process_status.match(regex)) {
|
||||||
|
|
Loading…
Reference in New Issue