IO-1978 Selection of lines for parts return
This commit is contained in:
@@ -5,7 +5,7 @@ import AlertComponent from "../alert/alert.component";
|
||||
import { Prompt, useLocation } from "react-router-dom";
|
||||
import "./form-fields-changed.styles.scss";
|
||||
|
||||
export default function FormsFieldChanged({ form }) {
|
||||
export default function FormsFieldChanged({ form, skipPrompt }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleReset = () => {
|
||||
@@ -25,7 +25,7 @@ export default function FormsFieldChanged({ form }) {
|
||||
return (
|
||||
<Space direction="vertical" style={{ width: "100%" }}>
|
||||
<Prompt
|
||||
when={true}
|
||||
when={skipPrompt ? false : true}
|
||||
message={(location) => {
|
||||
if (loc.pathname === location.pathname) return false;
|
||||
return t("general.messages.unsavedchangespopup");
|
||||
|
||||
Reference in New Issue
Block a user