Skip to content

Passing new updated data but rendering with initial data sent to the tree #519

@Arjav97

Description

@Arjav97

What i am doing is in the onChange function i am setting the selected nodes in the state using useState and then rendering the selected nodes on right of the tree where each selected label is displayed with cross symbol and onClick of that cross button the node is deleted from the list and also updating the data by setting checked to false of that particular node and then when I am passing that deep cloned updated data to child component then all the checkboxes are unchecked as it is set with initial data.

I dont know the reason why it is happening since I am rendering child with HOC wherein I am using shouldComponent and willReceiveProps to identify the updated data that is sent as props is different from the previous data.

Need of any suggestions as if this setting up with new updated data cannot be done then I would have to find any other route of doing this dropdown tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions