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

How rename name to node_name and create node with name #240

Open
R2Tokuyama opened this issue Apr 2, 2024 · 0 comments
Open

How rename name to node_name and create node with name #240

R2Tokuyama opened this issue Apr 2, 2024 · 0 comments

Comments

@R2Tokuyama
Copy link

I have two problems regarding name, so how do I solve them in react-arborist?

1. How rename name to node_name

I'd like to edit nodes using a property named node_name instead of name. My data structure is in the following format. Although I can get initial data and reflect it on the UI, I'm unable to edit node name because the property name is node_name.

{
  "id": "1",
  "node_name": "vehicle",
  "children": []
},
{
  "id": "2",
  "node_name": "fruit",
  "children": [
    {
      "id": "3",
      "node_name": "apple",
      "children": []
    }
  ]
}

2. How create node with name

When creating node using createLeaf(), it creates node with empty name, so How can I create node with name through an input field.

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

No branches or pull requests

1 participant