I've been trying to add borders that connect to the nodes in the mui treeview, but I'm having difficulty with not having a vertical border when it's the last leaf node.
It currently looks like this:
However, it should not have vertical borders in these areas:
Example of the issue can be seen here.
The last leaf node should look like: leaf border.
Here is a codesandbox of the code: Click here for the codesandbox.
Any assistance would be greatly appreciated!