title: How to position a popup box (child page) in a React table (parent) in a relative manner - CSS/ReactJS/Javascript
body: <p>I am working on a React Table. I have a columns in which the data cells have an expander icon. If we click on the expander, a popup page/tooltip is opened/displayed. </p>
  
  <p>Now I have two question - 1. How can a display the popup page/tooltip relative wrt to data cell in which the expander was clicked. For example age has 1000s of rows. There is pagination and page size. So suppose the position of the popup box/tooltip when row 4 is clicked will be different from the position of the popup box/tooltip when row 7 is clicked. The small yellow thing you are seeing is my popup page/tooltip</p>
  
  <p><a href="https://i.stack.imgur.com/hlaQv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hlaQv.png" alt="Popup 1"></a></p>
  
  <p>In my Code, the popup is fixed to the same position irrespective of which row cell of that particular column I click.</p>
  
  <p>I want to know how can display the popup page relative wrt to data cell in which the expander was clicked. Basically changing top and left will do the job. But how can I implement. Based on what should I give top and left?</p>
  
  <p>The second question is - 2. How can I close the popup page if I click outside the popup page?</p>
  
  <p>My Complete Code Sample is here - <a href="https://codesandbox.io/s/04j6voy0pn" rel="nofollow noreferrer">Demo/Fiddle</a></p>
  
  <p>This is my Popup Page CSS </p>
  
  <pre><code>.filter-child {
    width: 30%;
    position: absolute;
    z-index: 10;
    background: #ffffe0;
    padding: 15px;
    border: solid 1px #e9eff4;
    top: 32%;
    left: 45%;
  }
  </code></pre>
  
  <p>What is the best way to achieve this - CSS/Plain JS/React Props from parent? If i use React Props what should I send as props for this relative styling.</p>
  
  <p>Can this be achieved by CSS/Vanilla JS?</p>
  
  <p>If you can help me in this regard, kindly update my <a href="https://codesandbox.io/s/04j6voy0pn" rel="nofollow noreferrer">Demo/Fiddle</a> and show me how to achieve the desired functionality. </p>
  
  <p>It may seem that parent page/table is the parent but here according to my understanding the data cell/row cell (on which the click was made) is acting as the real parent.</p>
  
  <p>The child popup-box/tooltips will not be in the position of the cell which was clicked. I want to position this child popup-box/tooltips a little below the the position of the cell which was clicked.</p>
  
  <p>Can someone on Stack update/fork my <a href="https://codesandbox.io/s/04j6voy0pn" rel="nofollow noreferrer">Demo/Fiddle</a> and show me how to achieve the desired functionality? </p>