Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: support pick item props #48

Closed
atian25 opened this issue Nov 1, 2022 · 2 comments
Closed

feature request: support pick item props #48

atian25 opened this issue Nov 1, 2022 · 2 comments

Comments

@atian25
Copy link

atian25 commented Nov 1, 2022

const tree = arrayToTree(arr, {
  transform: ['id',  'key1'],
  // transform: item => { return { id: item.id, key1: item.key1 } },
});
@gburning
Copy link

I would appreciate something like this as well. I don't need parentId once my collection is already hierarchical tree for example. It would be nice to be able to strip it from the results.

@philipstanislaus
Copy link
Owner

Hi everyone, sorry for getting bac to this earlier.

I wanted to eventually review #49 in detail but did not find the time amongst other responsibilities. Since this will not change in the near future, I decided to no longer maintain this repository.

Still, a few thoughts on the idea: I really like the idea of transforming data through a simple callback function. However, I believe it would be better to publish that as an alternative package, since many of the other config options would no longer be needed.

If you do (or did) publish this somewhere for people to use, feel free to add a link to #55.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants