Open KumarilDave opened 1 year ago
@KumarilDave Just add a search bar in your component with this logic
const [search, setSearch] = useState("")
const onSearchChange(e: ChangeEvent<HTMLInputElement>) {
setSearch(e.target.value)
}
useEffect(() => {
if (search === "") {
engine.zoomToFitNodes()
return;
}
const models = engine.getActiveModel().getModels()
models.forEach((model) => model.setSelected(false))
const matchedModels = models.filter((model) => model.getDescriptionOrWhateverYouWantToSearch().includes(search))
matchedModels.forEach((model) => model.setSelected(true))
engine.zoomToFitNodes(matchedModels)
}, [search])
Hope it will work for your use case
Hello. Our team has been using this product for our internal tools. It's been amazing so far. I was just wondering if there is any plans to add search functionality in the roadmap ? Or if there is some way to be able to search a node and it can zoom and pan to the target node/nodes