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

Clicking on item with subitems causes type error #81

Closed
Claybarn opened this issue Feb 24, 2024 · 2 comments · Fixed by #83
Closed

Clicking on item with subitems causes type error #81

Claybarn opened this issue Feb 24, 2024 · 2 comments · Fixed by #83
Labels

Comments

@Claybarn
Copy link
Contributor

Clicking on a menu item that has subitems (where the desired behavior is to have no action) causes the error:

props.data.handler is not a function

This error can be reproduced by clicking on the "extra" menu item found at the example here.

I imagine the solution is to add a empty function like:
handler() {}

on this line. I forked this repo in the hopes of making a PR with this change, however I can't ensure it fixes the problem because the rete-cli emits a "Type generating failed" error when attempting to compile the context-menu-plugin.

@Ni55aN
Copy link
Member

Ni55aN commented Feb 25, 2024

thanks, I'll take a look

duplicates #79

Claybarn added a commit to Claybarn/context-menu-plugin that referenced this issue Mar 3, 2024
Create empty handler function to avert crash when item with subitems is clicked clicked

Update factory.ts

Update factory.ts

Update factory.ts
Claybarn added a commit to Claybarn/context-menu-plugin that referenced this issue Mar 7, 2024
Create empty handler function to avert crash when item with subitems is clicked clicked

Update factory.ts

Update factory.ts

Update factory.ts

fixed trailing comma
@Ni55aN Ni55aN closed this as completed in #83 Mar 7, 2024
Ni55aN added a commit that referenced this issue Mar 7, 2024
create empty handler function to avert crash when item with subitems is clicked clicked
@rete-js
Copy link
Contributor

rete-js bot commented Mar 7, 2024

🎉 This issue has been resolved in version 2.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rete-js rete-js bot added the released label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants