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

Add a meta field for nodes to freely store data #100

Open
pierpo opened this issue Sep 6, 2022 · 1 comment
Open

Add a meta field for nodes to freely store data #100

pierpo opened this issue Sep 6, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@pierpo
Copy link

pierpo commented Sep 6, 2022

Is your feature request related to a problem? Please describe.

We're integrating LRUD in a react-native app, and we frequently need to access the data linked to our node. Most notably the ref of our element, and some other stuff.

Concerning the ref: the example on the README says that we simply could get our element in the DOM by id document.getElementById(id) to get its ref. But as we're using React Native, this is not possible!
Ideally, we'd love to store the ref in a meta field of the node.

Describe the solution you'd like

It would be lovely to simply be able to store meta data in the node.

lrud.registerNode(id, {
  meta: {
    anything: 'I want',
  }
})

Describe alternatives you've considered

We had no other idea 🤷

Additional context

None yet.

(also: THANK YOU for this amazing lib. You've done an amazing job, and this is a lifesaver ❤️ )

@pierpo pierpo added the enhancement New feature or request label Sep 6, 2022
@pierpo
Copy link
Author

pierpo commented Sep 6, 2022

Btw, I can submit a PR if you think the feature request is relevant 😊

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

No branches or pull requests

1 participant