Update node state when changing something, updated back button to act like one

This commit is contained in:
Lucas Oliveira 2023-12-04 17:38:06 -03:00
commit 0fc773ecee
2 changed files with 8 additions and 3 deletions

View file

@ -125,6 +125,7 @@ export default function ParameterComponent({
takeSnapshot();
}
data.node!.template[name].value = newValue;
updateNodeInternals(data.id);
// Set state to pending
//@ts-ignore
if (data.node!.template[name].value !== newValue) {

View file

@ -8,7 +8,7 @@ import {
DropdownMenuTrigger,
} from "../../../ui/dropdown-menu";
import { Link, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { alertContext } from "../../../../contexts/alertContext";
import { undoRedoContext } from "../../../../contexts/undoRedoContext";
import FlowSettingsModal from "../../../../modals/flowSettingsModal";
@ -38,9 +38,13 @@ export const MenuBar = ({ flows, tabId }: menuBarPropsType): JSX.Element => {
return (
<div className="round-button-div">
<Link to="/">
<button
onClick={() => {
navigate(-1);
}}
>
<IconComponent name="ChevronLeft" className="w-4" />
</Link>
</button>
<div className="header-menu-bar">
<DropdownMenu>
<DropdownMenuTrigger asChild>