Answer the question
In order to leave comments, you need to log in
How to do this task with a tree?
I have an array of objects
let tree = [{id:1,parent_id:0,name:"Росссия"},{id:2,parent_id:0,name:"Украина"},{id:3,parent_id:1,name:"Москва"},{id:4,parent_id:3,name:"Улица пушкина"}]
Answer the question
In order to leave comments, you need to log in
I'm not against writing my own bicycles, it's useful for understanding how certain solutions work, but I still recommend ant.design and its tree component, which is great for implementing such tasks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question