You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect this is because the LegendNode is looking in the wrong place on the context. It always checks legend.node instead of legend['bindType']. See here.
// from Legend/Node.tsx#L32const{options: defaultOptions, dataMap }=legend.node;const[state,setState]=React.useState({options: defaultOptions,});
The value gets set on legend['bindType'] in the parent component here
Sandbox - https://codesandbox.io/s/legend-bug-repro-3mk71p?file=/App.tsx
You can see that when the bindType is edge there is an exception thrown. But if you set that same value to node then things go smoothly.
As mentioned before, that seems related to this line here.
Expected behavior
Should be able to render the same way in the DOM for both Nodes & Edges.
Screenshots or Videos
Platform
OS: Windows
Browser: Edge
Version: 112.0.1704.0
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When I pass the BindType='edge' into the Legend control, it throws an exception.
TypeError: Cannot read properties of undefined (reading 'options')
Example
I suspect this is because the LegendNode is looking in the wrong place on the context. It always checks
legend.node
instead oflegend['bindType']
. See here.The value gets set on
legend['bindType']
in the parent component hereYour Example Website or App
https://codesandbox.io/s/legend-bug-repro-3mk71p?file=/App.tsx
Steps to Reproduce the Bug or Issue
Sandbox - https://codesandbox.io/s/legend-bug-repro-3mk71p?file=/App.tsx
You can see that when the
bindType
isedge
there is an exception thrown. But if you set that same value tonode
then things go smoothly.As mentioned before, that seems related to this line here.
Expected behavior
Should be able to render the same way in the DOM for both Nodes & Edges.
Screenshots or Videos
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: