Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
How to get the parent node id from ngx-treeview

I am using ngx-dropdown treeview for the tree dropdown structure. When I am selecting in the dropdown only child ids are getting.

the response is like

    [
    {id:1,categoryName:Test,subCategory:[{id:2,categoryName:child1},{id:3,categoryName:child2}]}
    {id:4,categoryName:Test2,subCategory:[{id:5,categoryName:child3},{id:6,categoryName:child4}]}
    ]

    <ngx-dropdown-treeview
     [items]="items"
     [config]="config"
     (selectedChange)="onSelectedChange($event)"
     (filterChange)="onFilterChange($event)"
     >
    </ngx-dropdown-treeview>

    onSelectedChange(event){
    console.log(event)
    }

If we select parent category Test, then the response is coming in the console like [2,3].
Is there any way to get the id of the parent category also? Like [1,2,3]

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!