This is the angular code i used for highlighting the nodes. But, it doesn’t seem to work for react?. Any Thoughts on this?
searchDiagram() {
this.diagram.nodeTemplate.mouseEnter;
this.diagram.startTransaction("highlight search");
if (this.searchValue) {
// search four different data properties for the string, any of which may match for success
// create a case insensitive RegExp from what the user typed
let regex = new RegExp(this.searchValue, "i");
let results = this.diagram.findNodesByExample(
{ key: regex },
{ desc: regex }
);
this.diagram.highlightCollection(results);
// try to center the diagram at the first node that was found
if (results.count > 0) {
this.diagram.centerRect(results.first().actualBounds);
}
} else {
// empty string only clears highlighteds collection
this.diagram.clearHighlighteds();
}
this.diagram.commitTransaction("highlight search");
}