Deleting a Middle Node leads to all other connectors getting removed from view
See original GitHub issueI was using the example from dev folder. Delete option was added to NodeType2 in this demo. Instead of adding NodeType2 as the last node ( as given in example ), I added it as a middle node by changing the connections source and target in data.ts file. On deleting the node, the connections are not removed from view or not deleted in few scenarios. @ajainarayanan
Steps to Reproduce issue: Replace the data.ts with the data below. Delete node ( Node Type 2 (action 1) ), add a new node of any type. All the existing connections are removed from view.
export const data = {
connections: [
{
sourceId: "1",
targetId: "2",
},
{
sourceId: "2",
targetId: "3",
},
{
sourceId: "2",
targetId: "4",
},
{
sourceId: "3",
targetId: "4",
},
{
sourceId: "3",
targetId: "5",
},
{
sourceId: "4",
targetId: "5",
},
],
nodes: [
{
config: {
label: "Default Node",
type: "source",
},
id: "1",
},
{
config: {
label: "Node Type 1 (action)",
type: "action",
},
id: "2",
},
{
config: {
label: "Node Type 1 (action)",
type: "action",
},
id: "3",
},
{
config: {
label: "Node Type 2",
type: "action",
},
id: "4",
},
{
config: {
label: "Node Type 2",
type: "action",
},
id: "5",
},
],
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Delete middle of linked list - GeeksforGeeks
Simple solution: The idea is to first count the number of nodes in a linked list, then delete n/2'th node using the simple...
Read more >Algorithm to delete a node from the middle - Stack Overflow
The main problem is that in your while loop you need to walk through the linked list, and you do not do that:...
Read more >Delete the Middle Node of a Linked List - LeetCode
Delete the Middle Node of a Linked List - You are given the head of a linked list. Delete the middle node, and...
Read more >Draw or delete a line or connector - Microsoft Support
If you want to delete multiple lines or connectors, select the first line, press and hold Ctrl while you select the other lines,...
Read more >Deleting a node - Documentation - Ping Identity
Delete a node to remove it from the flow and break any connections to it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ajainarayanan This works. Closing the issue. Thanks.
Can you check the line no. 54 of connectionReducers.ts ?
Instead of finding the indexOf(“-right”), it should be as above. This fixes the issue. @ajainarayanan