Skip to content

Highlight parent in case one of the grand children has been changed #22

@medhatdawoud

Description

@medhatdawoud

whenever we have the ref on an element and one of its children get changed using state it gets highlighted, that's the normal case, but what I want to add here as a feature is whenever one of its children or grandchildren changed I need to highlight the whole container.

example

<ChangeHighlight>
  <div className="div1" ref={React.createRef()}>
    <div className="div2">
      <div className="div3">{changeHappenedHere}</div>
      <p>...</p>
    </div>
  </div>
</ChangeHighlight>

in this example nothing will happen with the current implementation v1.2.3 I need div1 to be highlighted in case of the content of div3 changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions