Skip to content

Not able to add new node  #10

@Vineeth-Mohan

Description

@Vineeth-Mohan

I made a small change to js/example.js and added the below code

ReactDOM.render(
React.createElement(TreeView, {data: data,allowNew: true,removable: true , onNodeAdded: function(){return true}}),
document.getElementById('treeview')
);

With this , i am able to see option to add new node. But on pressing "Add" , its emitting this error in the console.

On pressing "Plus" button -

Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

After entering the text , on pressing "Add" button , nothing is happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions