Skip to content

Commit

Permalink
fix:OH2-450 | Fix operations table refresh after deletion and major f…
Browse files Browse the repository at this point in the history
…ield (#717)
  • Loading branch information
SilverD3 authored Feb 5, 2025
1 parent a6607f6 commit 87726d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const OperationForm: FC<IOperationProps> = ({

const handleCheckboxChange = useCallback(
(fieldName: string) => (value: boolean) => {
setFieldValue(fieldName, value ? "0" : "1");
setFieldValue(fieldName, !!value ? 1 : 0);
},
[setFieldValue]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { useTranslation } from "react-i18next";
import checkIcon from "../../../../../assets/check-icon.png";
import { OperationDTO, OperationDTOOpeForEnum } from "../../../../../generated";
import { scrollToElement } from "../../../../../libraries/uiUtils/scrollToElement";
import { deleteOperationReset } from "../../../../../state/operations";
import {
deleteOperationReset,
getOperations,
} from "../../../../../state/operations";
import ConfirmationDialog from "../../../confirmationDialog/ConfirmationDialog";
import InfoBox from "../../../infoBox/InfoBox";
import { TFilterField } from "../../../table/filter/types";
Expand Down Expand Up @@ -169,6 +172,7 @@ export const OperationTable: FunctionComponent<IOwnProps> = ({
primaryButtonLabel="Ok"
handlePrimaryButtonClick={() => {
dispatch(deleteOperationReset());
dispatch(getOperations());
}}
handleSecondaryButtonClick={() => ({})}
/>
Expand Down

0 comments on commit 87726d3

Please sign in to comment.