8000 🐛 [BUG]: NodeToolbar isVisible prop "not optional" · Issue #1783 · bcakmakoglu/vue-flow · GitHub
[go: up one dir, main page]

Skip to content

🐛 [BUG]: NodeToolbar isVisible prop "not optional" #1783

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

Closed
1 task done
Tracked by #1785
tobiasstr opened this issue Mar 7, 2025 · 2 comments
Closed
1 task done
Tracked by #1785

🐛 [BUG]: NodeToolbar isVisible prop "not optional" #1783

tobiasstr opened this issue Mar 7, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tobiasstr
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and this is a new bug.

Current Behavior

When using the NodeToolbar component without passing the isVisible prop, the toolbar does not show when selecting/clicking nodes. Reading the docs it seems like isVisible should be optional, but due to how boolean casting works for props, not passing it is equal to passing false.

Expected Behavior

When omitting the isVisible prop, selected nodes should still show the toolbar.

Passing undefined explicitly makes it work how I expect, so if I understand correctly, it is supposed to work without requiring something like data.toolbarVisible? If so, it is actually optional, hence the quotes in the tile.

Maybe explicitly set undefined as the default value? Or maybe it is more Vue idiomatic the way it is, I am not sure. But it took me a little while to figure out what was going on after I removed data.toolbarVisible and stopped passing isVisible, and it stopped working.

Steps To Reproduce

No response

Minimal reproduction of the issue with CodeSandbox

No response

Relevant log output

Anything else?

Maybe relevant vuejs/core#8576

@tobiasstr tobiasstr added bug Something isn't working triage Awaiting triage labels Mar 7, 2025
@bcakmakoglu
Copy link
Owner

Thanks for the report, I'll check it out.

@bcakmakoglu
Copy link
Owner

Fixed with @vue-flow/node-toolbar@1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0