Closed AnirudhWT closed 1 year ago
@jerosoler Getting data : Array of objects from some api in angular and using them to map with drawflow.
The question is very open.
What kind of data? What do you want to map? If the node already exists? Create more nodes? Modify the nodes? ....
Hi @jerosoler , what could be wrong if this event not triggered at all ?
editor.on('import', function () {
console.log("Successfully import");
});
@surihoney Is that code before importing?
i put it after, i tried put it before import also not working, what's the correct order?
`
editor.start();
editor.import(data);
editor.on('import', function () { console.log("Successfully import"); }); `
1 start 2 on import event 3 import data
Still not working, I think maybe because it's inside React component's useEffect maybe it has something to do with that. Thank you for this awesome library .
Hi this is silly , but what causing the issue I mention above (the import event not triggered) , is because I used the older version of this code. After upgraded, now works flawlessly . @jerosoler
You can use events to detect.
For example when an import data: