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

Props are not passed to sockets #723

Open
1 task done
pokecheater opened this issue Jan 2, 2025 · 0 comments
Open
1 task done

Props are not passed to sockets #723

pokecheater opened this issue Jan 2, 2025 · 0 comments
Labels

Comments

@pokecheater
Copy link

Describe the bug

Hey,

I followed your tutorial:

https://retejs.org/examples/customization/vue

But it seems that the defined data props are not passed to the socket.

As you can see here, like in your tutorial example I defined the prop data for my socket:
image

On the node template I call it with the ref and pass some values to data.
image

However inside the rendering only the name of the socket is available which I have not defined at all...
image

So 2 questions:
-> Where does the name property inside data come from? Seems that there is some logic that is called when using the Ref.
-> Is this behaviour intendet? How do I pass custom values to the socket then?

Thx in advance

Example to reproduce

No response

How to reproduce

Go to your own examples:
https://retejs.org/examples/customization/vue
and replace the socket code with this:

{{data}}
<script> export default { props: ['data'] } </script> <style lang="scss" scoped> @use "sass:math"; @import "./vars"; .socket { display: inline-block; cursor: pointer; border: 1px solid grey; width: $socket-size; height: $socket-size * 2; vertical-align: middle; background: #fff; z-index: 2; box-sizing: border-box; &:hover { background: #ddd; } } </style>

See that there is only name property:

image

thoose properties are not used at all:

image

Expected behavior

parameters should be passed correctly

Dependencies

"rete": "^2.0.5",
"rete-area-plugin": "^2.1.3",
"rete-connection-plugin": "^2.0.5",
"rete-render-utils": "^2.0.3",
"rete-vue-plugin": "^2.1.1",
"rete-vue-render-plugin": "^0.5.2",

Platform

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@pokecheater pokecheater added the bug label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant