Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

287
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda