fix(tabsContext.tsx): remove unnecessary line that sets official property to false on component.node
fix(nodeToolbarComponent/index.tsx): fix downloadNode function call to pass a deep clone of data instead of the original data object fix(reactflowUtils.ts): remove unnecessary line that sets official property to false on nodeData.node
This commit is contained in:
parent
9ec4784afb
commit
25227db9f7
3 changed files with 2 additions and 3 deletions
|
|
@ -697,7 +697,6 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
` (${increment})`;
|
` (${increment})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
component.node!.official = false;
|
|
||||||
addFlow(true, createFlowComponent(component));
|
addFlow(true, createFlowComponent(component));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,7 @@ export default function NodeToolbarComponent({
|
||||||
updateNodeInternals(data.id);
|
updateNodeInternals(data.id);
|
||||||
break;
|
break;
|
||||||
case "Download":
|
case "Download":
|
||||||
//TODO add logic to save node on backend and update toolbar
|
downloadNode(createFlowComponent(cloneDeep(data)));
|
||||||
downloadNode(createFlowComponent(data));
|
|
||||||
break;
|
break;
|
||||||
case "Share":
|
case "Share":
|
||||||
//TODO add logic to save node on backend and update toolbar
|
//TODO add logic to save node on backend and update toolbar
|
||||||
|
|
|
||||||
|
|
@ -1065,6 +1065,7 @@ export function getGroupStatus(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createFlowComponent(nodeData: NodeDataType): FlowType {
|
export function createFlowComponent(nodeData: NodeDataType): FlowType {
|
||||||
|
nodeData.node!.official = false;
|
||||||
const flowNode: FlowType = {
|
const flowNode: FlowType = {
|
||||||
data: {
|
data: {
|
||||||
edges: [],
|
edges: [],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue