Blazor.Diagrams
Blazor.Diagrams copied to clipboard
Change ' ShouldDelete*' methods to invoke 'Func' only once.
Before this change 'ShouldDelete*' would call passed 'Func' once for every selection. With this change, it calls 'Func' only once for multiple selections. Issue discussed : https://github.com/Blazor-Diagrams/Blazor.Diagrams/issues/164
Please review this once you get time.
Hello. sorry for the late reply. I'm just still thinking to see whether this approach is the best one, I have 2 worries right now:
- Is this efficient? Creating 3 arrays (looping 3 times in your case too) might be too much
- What if the user asks to delete 2 nodes, but you can only delete 1 of them. In your case, if you return false you wouldn't delete anything, is that the desired behavior?
What do you think?
Here's another thought: What about having one ShouldDeleteModels? (Worry 2 is still there though)
I have made changes for the same. Removed multiple for loops . Please let me know can we do this way?
Is this solution will work for you? Please let me know so we can discuss further
Hi It will be great if you suggest something on this..
Hi sorry, I'm still thinking whether this is the best solution that we can do.
Please give your thoughts. So will make changes as required.