You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But why declare new Drawflow twice in this case? In my case, I could not get data to the instance in the child component of the node in any way. Everything started working fine after I fixed on
The next problem was that props for the component can only be passed at the register node stage. It seemed a little pointless to me, because at the register node stage, a skeleton (model) of the future node is created and there is no reason to transfer real data at this stage. For example, the type of my node is ConditionNode, it is used to check the conditions and, depending on the result, redirect the stream further. Thus, I have a lot of nodes with this type and inside each of them there is different data for the same form.
I had to fix the source code and deploy the library locally.
I suggest making changes to the source code so that access to NodeID and data is permanent. There is also a more detailed explanation of why options for vue are needed in this case and how to use them.
The text was updated successfully, but these errors were encountered:
Thank you very much for this great library! However, when developing on vue 3, I ran into some problems.
The first thing I came across was an erroneous description of the vue 3 connection in the documentation:
But why declare new Drawflow twice in this case? In my case, I could not get data to the instance in the child component of the node in any way. Everything started working fine after I fixed on
The next problem was that props for the component can only be passed at the register node stage. It seemed a little pointless to me, because at the register node stage, a skeleton (model) of the future node is created and there is no reason to transfer real data at this stage. For example, the type of my node is ConditionNode, it is used to check the conditions and, depending on the result, redirect the stream further. Thus, I have a lot of nodes with this type and inside each of them there is different data for the same form.
I had to fix the source code and deploy the library locally.
git clone https://github.com/jerosoler/Drawflow.git
cd Drawflow
npm install
then I made the following changes to src/drawflow.js
approximately 1233 lines
let wrapper = this.render.h(this.noderegister[html].html, {nodeId:newNodeId,data:data}, this.noderegister[html].options);
approximately 1370 lines
let wrapper = this.render.h(this.noderegister[dataNode.html].html, {nodeId:dataNode.id,data:dataNode.data}, this.noderegister[dataNode.html].options);
so I passed NodeID and data as props
further
npm run build
and
import Drawflow from 'path/to/your/modified/drawflow';
After that, my component appeared
Also be sure to set df value with the parent drawflow instance
further, after I change some values in the form and click save, I can now update the values of the parent node
I suggest making changes to the source code so that access to NodeID and data is permanent. There is also a more detailed explanation of why options for vue are needed in this case and how to use them.
The text was updated successfully, but these errors were encountered: