Adding nodes and edges using pinia store #850
-
I've had some issues where all nodes disappear from dom when I push new nodes into the elements array using different stores in pinia. I could neither find any examples of adding new nodes inside a pinia store. Would appreciate it so much if I could see an example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Instead of using v-model to bind both nodes and edges to the same array in Vue Flow, I decided to separate them into separate arrays. This helped to resolve the issue I was facing. Now, I am using v-model to bind only nodes to the nodes array and v-bind to bind edges to the edges array. Example:
Now in a separate store I can do:
|
Beta Was this translation helpful? Give feedback.
Instead of using v-model to bind both nodes and edges to the same array in Vue Flow, I decided to separate them into separate arrays. This helped to resolve the issue I was facing. Now, I am using v-model to bind only nodes to the nodes array and v-bind to bind edges to the edges array.
Example:
Now in a separate store I can do: