get the columsn for the instance list table anytime filter options are displayed if empty

This commit is contained in:
jasquat 2022-12-06 09:46:32 -05:00
parent d2ede13dba
commit b17f977e4c
1 changed files with 21 additions and 13 deletions

View File

@ -372,15 +372,18 @@ export default function ProcessInstanceListTable({
titleOperation = 'Created';
}
return (
<InlineNotification
title={`Perspective ${titleOperation}:`}
subtitle={`'${
processInstanceReportSelection
? processInstanceReportSelection.identifier
: ''
}'`}
kind="success"
/>
<>
<InlineNotification
title={`Perspective ${titleOperation}:`}
subtitle={`'${
processInstanceReportSelection
? processInstanceReportSelection.identifier
: ''
}'`}
kind="success"
/>
<br />
</>
);
}
return null;
@ -935,6 +938,15 @@ export default function ProcessInstanceListTable({
if (!showFilterOptions) {
return null;
}
// get the columns anytime we display the filter options if they are empty
if (availableReportColumns.length < 1) {
HttpService.makeCallToBackend({
path: `/process-instances/reports/columns`,
successCallback: setAvailableReportColumns,
});
}
return (
<>
<Grid fullWidth className="with-bottom-margin">
@ -1134,10 +1146,6 @@ export default function ProcessInstanceListTable({
const toggleShowFilterOptions = () => {
setShowFilterOptions(!showFilterOptions);
HttpService.makeCallToBackend({
path: `/process-instances/reports/columns`,
successCallback: setAvailableReportColumns,
});
};
const reportSearchComponent = () => {