Skip to content

Commit

Permalink
fixed layoutset ref to use correct value
Browse files Browse the repository at this point in the history
  • Loading branch information
nkylstad committed Apr 24, 2024
1 parent 6fe130c commit 9f1dc92
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export const FormItemContextProvider = ({
org,
app,
prevSelectedFormLayoutNameRef.current,
prevSelectedFormLayoutSetNameRef.current,
selectedFormLayoutSetName,
);
const { mutateAsync: updateFormComponent } = useUpdateFormComponentMutation(
org,
app,
prevSelectedFormLayoutNameRef.current,
prevSelectedFormLayoutSetNameRef.current,
selectedFormLayoutSetName,
);

useEffect(() => {
Expand Down Expand Up @@ -153,7 +153,7 @@ export const FormItemContextProvider = ({
return;
await handleSave();
handleDiscard();
prevSelectedFormLayoutSetNameRef.current = selectedFormLayoutName;
prevSelectedFormLayoutSetNameRef.current = selectedFormLayoutSetName;

Check warning on line 156 in frontend/packages/ux-editor/src/containers/FormItemContext.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/packages/ux-editor/src/containers/FormItemContext.tsx#L156

Added line #L156 was not covered by tests
prevSelectedFormLayoutNameRef.current = selectedFormLayoutName;
};

Expand Down

0 comments on commit 9f1dc92

Please sign in to comment.