-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete Edge Not Working #1914
Comments
To address the edge deletion issue and improve usability in your project, here are some targeted solutions:
These steps should help you resolve the edge deletion issue and improve the user experience by making edges more visible when selected and easier to delete.
|
@dosu When I select edge and press delete, the edge id or info does not appear in lastselection |
To resolve the issue where const onSelectionChange = useCallback(
(flow: OnSelectionChangeParams): void => {
setLastSelection(flow);
},
[],
); Ensure that For the UI improvements and making edge deletion more intuitive:
useEffect(() => {
const onKeyDown = (event: KeyboardEvent) => {
if ((event.key === "Delete" || event.key === "Backspace") && lastSelection?.edges.length > 0) {
event.preventDefault();
deleteEdge(lastSelection.edges.map((edge) => edge.id));
}
};
document.addEventListener("keydown", onKeyDown);
return () => {
document.removeEventListener("keydown", onKeyDown);
};
}, [lastSelection, deleteEdge]);
Implementing these steps should help in resolving the edge deletion issue and improving the overall user experience in your project.
|
@dosu The edge is correctly shown here when selected
However, the lastSelection is empty here
|
To tackle the issue where
By focusing on these areas, you should be able to ensure that
|
Hello @satpalsr, |
Hi @satpalsr, I hope you're doing well. Just a friendly reminder that if we do not hear back from you within the next 3 days, we will close this issue. If you need more time or further assistance, please let us know. Thank you for your understanding! |
Resolved. Thanks. |
Describe the bug
I'm on latest dev branch.
I am not able to delete an edge between two nodes.
I have check logs and see that edge id is empty when pressing delete button.
Also may be edge should glow up a bit when selected to show clear indication of it being selected.
or a (x) cross button can be added between edges to easily delete it.
Browser and Version
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: