Usage of Form like input data and Render the data entered inside node #658
Replies: 1 comment
-
|
Hi there! I'm not sure if Here are a few ideas based on my understanding of your needs. Keep in mind, these are just starting points—please consider them carefully! 😄
You could use the To display text, you can use
I haven't really thought about adding a button directly within the Cell. This may be a Cell with a specific style to make user think it is a button. You'll likely need to explore and experiment a bit to find the best approach, but if you manage to implement it, here's a possible approach: When the user clicks the button, retrieve all child cells of the parent (the form container). Filter out the cells that correspond to inputs, extract their values, and then use those values to create a new node in the graph.
When updating multiple cells, it’s recommended to use a transaction to ensure the model updates smoothly. You can find more on this in the maxGraph model documentation. Alternatively, you can use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m working on a project where I need to create a form that accepts user inputs (like name and description), and after submitting the form, the data should be rendered on the same node in MaxGraph.
I would appreciate any guidance or examples on how to achieve this. Specifically:
Whether I need to create a new custom shape for this or extend Rectangle shape to add support for form
How can I capture the form data and dynamically add it to a new node in the graph?
Are there best practices for updating nodes with new data from the form?
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions