Comments (6)
the local stored json look like this:
Yes, and this JSON should be set to the startDefinition
variable.
If you use React you can implement it in this way:
const [definition, setDefinition] = useState(() => {
const ls = localStorage['lastState'];
return wrapDefinition(ls ? JSON.parse(ls) : { properties: {}, sequence: [] });
});
from sequential-workflow-designer.
Hello @kaleem-uet! I think you should save somewhere the definition before you navigate to a next page. It could be localStorage
for example.
from sequential-workflow-designer.
I have stored it already in the local storage but how i can load the json to canvas (flow-diagram), starting from an empty page ?
from sequential-workflow-designer.
const definition = { /* ... */ }; // < here you set your JSON
Designer.create(placeholder, definition, { /* configuration */ });
We have a lot examples how to load the definition at start:
- https://nocode-js.github.io/sequential-workflow-designer/examples/fullscreen.html
- https://nocode-js.github.io/sequential-workflow-designer/examples/live-testing.html
from sequential-workflow-designer.
I am using this libray with react js where the definition is:
const startDefinition: WorkflowDefinition = { type: "root", properties: { }, sequence: [] }
There is no doubt that when some one place createWrite() function "that is created already" in the sequence it will create the createWrite node when the canvas open but in my case,
the local stored json look like this:
{ "type": "root", "properties": {}, "sequence": [ { "id": "4a461004e0b7b9b164d007f784eec730", "componentType": "switch", "name": "if", "properties": {}, "branches": { "true": [], "false": [] } } ] }
and i want to make the flow from this json.
from sequential-workflow-designer.
@b4rtaz
Thanks 🙏 for the speedy responses and great support – your dedication has made using NoCodeJS a breeze!
from sequential-workflow-designer.
Related Issues (20)
- [react] Throw exception on undo action HOT 2
- How can I make the step a leaf step of the flow? HOT 4
- Y-Scroll offset for step container HOT 2
- SUPER large algos crash chrome tab HOT 4
- Can we have multiple independent flow diagram. HOT 1
- Is there a way to highlight a step in the designer without actually selecting the step? HOT 2
- User defined conditionals? HOT 3
- public mutation events and pragmatically create actions HOT 1
- Customization of drop positions and styling HOT 5
- Property value of dynamically rendered component in designer isnt updating immediately HOT 5
- Can I change Ui template for task or switch HOT 5
- Start from a specific step HOT 2
- How to know is finished ? HOT 2
- Cannot use sequential-workflow-designer-react with React 17 and lower HOT 2
- Copy/Paste for steps HOT 2
- package 'sequential-workflow-designer' not found HOT 5
- Svelte Support for Sequential Workflow Designer HOT 3
- Scrolling issue in toolbox HOT 2
- Backspace key delete step HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sequential-workflow-designer.