- Home
- Forum
- React - EJ 2
- Is there a possibility to perform a search of nodes in diagram?
Is there a possibility to perform a search of nodes in diagram?
-Is there a possibility to perform a search of the nodes of the diagram and to only render nodes without connectors?
Best regards,
Jiway S.A.
SIGN IN To post a reply.
8 Replies
SG
Shyam G
Syncfusion Team
November 13, 2019 12:06 PM UTC
Hi Jiway,
We suspect that you need to iterate the nodes collection in the diagram and to find a specific node in it. If so, please refer to a code example to iterate the nodes collection. If we misunderstood your requirement, please share us more details such as elaborate your requirement in detail with screenshot.
Code example:
|
<DiagramComponent id="diagram"
ref={diagram => (diagramInstance = diagram)} width={"100%"} height={"640px"}
created={(args) => {
//iterate a nodes collection
for(var i=0; i < diagramInstance.nodes.length;i++) {
// get a node
var node = diagramInstance.nodes[i];
}
}}
>
</DiagramComponent> |
Regards,
Shyam G
DT
Dominique Toussaint
November 13, 2019 12:19 PM UTC
Hi Shyam G,
thank you for this I will try this it might work, If not I will let you know.
Best regards,
Jiway S.A
DT
Dominique Toussaint
November 13, 2019 01:09 PM UTC
Hi Shyam,
we would need an actual search operation, not on the created event but after creation, like one of CRUD operations in your example (https://ej2.syncfusion.com/react/demos/?utm_source=installer&utm_medium=listing&utm_campaign=controlpanel#/material/diagram/crud) but only with search operation. There would be one dialog where we would search and filter by text of nodes and then show nodes separate from each other like in your example.
Best regards,
Jiway S.A.
SG
Shyam G
Syncfusion Team
November 14, 2019 11:33 PM UTC
Hi Jiway,
We can show the diagram nodes in a popup while searching it using textbox by clicking on the button. If an nodes in diagram established with connection in the diagram, then how the diagram nodes should be displayed in a popup?
Regards,
Shyam G
DT
Dominique Toussaint
November 19, 2019 05:16 PM UTC
Hi Shyam G,
no need for your reply this has been resolved.
Best regards,
Jiway S.A.
SG
Shyam G
Syncfusion Team
November 20, 2019 12:46 AM UTC
Hi Jiway,
We have created a sample in which we have rendered two diagrams and one dialog component. We have rendered a diagram with nodes initially. When you click on the button, we open a dialog with new diagram. similarly, you can search a node and append in the dialog content of new diagram. please refer to a sample below.
Regards,
Shyam G
DT
Dominique Toussaint
November 20, 2019 06:49 AM UTC
Hi Shyam G,
it is ok, like I said I have resolved that already.
Best regards,
Jiway S.A.
SG
Shyam G
Syncfusion Team
November 20, 2019 08:36 AM UTC
Hi Jiway,
Thanks for your update.
Regards,
Shyam G
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
DT Dominique Toussaint
- Nov 12, 2019 06:35 AM UTC
- Nov 20, 2019 08:36 AM UTC