Skip to content
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

Type definition incorrect in LassoSelect behavior onSelect callback #477

Open
msnyder-msft opened this issue Mar 29, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working Typing Error

Comments

@msnyder-msft
Copy link

Describe the bug

The type definition for the onSelect callback in the LassoSelect component is () => void but the real G6 behavior definition (defined here) is (nodes, edges)=>void.

image

image

Your Example Website or App

N/A

Steps to Reproduce the Bug or Issue

Use the LassoSelect component
Provide the onSelect callback and try to acces the selected nodes or edges.

<LassoSelect
    includeEdges={false}
    onSelect={(nodes, edges) => {
        console.log('nodes', nodes);
        console.log('edges', edges);
    }}
/>

Expected behavior

Should not get a typing error.
image

Screenshots or Videos

image

Platform

  • OS: Windows

Additional context

No response

@pomelo-nwu
Copy link
Member

@msnyder-msft I'm sorry that I just noticed your problem. It should be the wrong type of Graphin. Could you give me a PR to help fix it?

@pomelo-nwu pomelo-nwu added the bug Something isn't working label May 28, 2023
@pomelo-nwu pomelo-nwu self-assigned this May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Typing Error
Projects
Status: No status
Development

No branches or pull requests

2 participants