Skip to content

Props are not passed to sockets #723

Open
@pokecheater

Description

@pokecheater

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions