Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deselect all rows after start task #754

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/events/partials/modals/StartTaskModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import StartTaskGeneralPage from "../ModalTabsAndPages/StartTaskGeneralPage";
import StartTaskWorkflowPage from "../ModalTabsAndPages/StartTaskWorkflowPage";
import StartTaskSummaryPage from "../ModalTabsAndPages/StartTaskSummaryPage";
import { postTasks } from "../../../../thunks/taskThunks";
import { changeAllSelected } from "../../../../thunks/tableThunks";
import { usePageFunctions } from "../../../../hooks/wizardHooks";
import { checkValidityStartTaskEventSelection } from "../../../../utils/bulkActionUtils";
import { useHotkeys } from "react-hotkeys-hook";
Expand All @@ -17,8 +18,9 @@ import { availableHotkeys } from "../../../../configs/hotkeysConfig";
* This component manages the pages of the task start bulk action
*/
const StartTaskModal = ({
close,
postTasks
close,
postTasks,
changeAllSelected
}: any) => {
const { t } = useTranslation();

Expand Down Expand Up @@ -79,6 +81,7 @@ const StartTaskModal = ({
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
const handleSubmit = (values) => {
postTasks(values);
changeAllSelected(false);
close();
};

Expand Down Expand Up @@ -153,6 +156,8 @@ const StartTaskModal = ({
const mapDispatchToState = (dispatch) => ({
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
postTasks: (values) => dispatch(postTasks(values)),
// @ts-expect-error TS(7006): Parameter 'values' implicitly has an 'any' type.
changeAllSelected: (selected) => dispatch(changeAllSelected(selected)),
});

export default connect(null, mapDispatchToState)(StartTaskModal);
Loading