Closed FTamas77 closed 10 months ago
Hi @FTamas77,
In Vue, only variables that are declared to be reactive values using ref
, reactive
, etc. can follow the changes.
Please try this by declaring nodes and edges enclosed in a reactive function as shown below.
import { reactive } from "vue";
export const nodes = reactive({});
export const edges = reactive({});
See also the detailed code below. https://dash14.github.io/v-network-graph/examples/operation.html#add-remove-network-elements
Best Regards
Thanks. It works. I've not known about this feature.
My data file has only this:
I did the data binding like this:
And I want to add my nodes like this:
This is the incoming data I want to convert:
And I store it corretly:
I've just started using javascript a couple of days ago, but I could find nothing that explain my issue.
EDIT:
I left some init values:
and added further nodes later:
I see only the nodes added in the initialization:
Maybe this one can be wrong: