Git Product home page Git Product logo

Comments (2)

yoavaa avatar yoavaa commented on August 15, 2024

Such a functionality is not a tree feature, rather, a functionality you can implement using the tree.
You should do the search on your model (the tree nodes) and find the node you wanna highlight. Lets call that node the search target node, or target for short.

Then, find all of the parent nodes of the target. Then use the expanded-nodes attribute to set all the parents to be expanded (such that the target will be visible in the tree), (see http://wix.github.io/angular-tree-control/#expandedNodes).

Use the angular template for tree labels to set the highlight on the target node. (see http://wix.github.io/angular-tree-control/#labels-template)

Hope that helps.

from angular-tree-control.

jay4smile avatar jay4smile commented on August 15, 2024

Hey,
Thanks for the reply.But I have implemented advance search and highlight the search word with my own logic.I kept seach box above treeview. put a watch on modal,and searching the child nodes.If child node is matched with searched word then I have created temporary data and feed it to tree-view control.

for highlighting keyword used highlight filter from ui.utils.js

Again thanks for reply

from angular-tree-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.