Set process model from filter

This commit is contained in:
Jon Herron 2022-11-16 13:51:24 -05:00
parent ba2e89a3a3
commit 4f9849a71f
1 changed files with 12 additions and 4 deletions

View File

@ -215,7 +215,6 @@ export default function ProcessInstanceListTable({
]);
useEffect(() => {
console.log(processInstanceFilters);
const filters = processInstanceFilters as any;
Object.keys(parametersToAlwaysFilterBy).forEach((paramName: string) => {
// @ts-expect-error TS(7053) FIXME:
@ -232,9 +231,13 @@ export default function ProcessInstanceListTable({
(paramName: string) => {
if (
paramName === 'process_model_identifier' &&
processModelFullIdentifier
typeof filters.process_model_identifier === 'string'
) {
// queryParamString += `&process_model_identifier=${processModelFullIdentifier}`;
processModelAvailableItems.forEach((item: any) => {
if (item.id === filters.process_model_identifier) {
setProcessModelSelection(item);
}
});
} else if (
paramName === 'process_status' &&
typeof filters.process_status === 'string'
@ -251,7 +254,12 @@ export default function ProcessInstanceListTable({
}
}
);
}, [processInstanceFilters]);
}, [
processInstanceFilters,
parametersToAlwaysFilterBy,
parametersToGetFromSearchParams,
processModelAvailableItems,
]);
// does the comparison, but also returns false if either argument
// is not truthy and therefore not comparable.