title: get access to selected row data from outside table component
body: <p>I have a common component for the table which is being used in different pages through the app. Now the selection of rows is being saved inside the table component itself. I want to access the selected rows of data from its parent component whenever button pressed</p>
  
  <p>Here is an example
  <a href="https://codesandbox.io/s/naughty-pond-3e5jp" rel="nofollow noreferrer">https://codesandbox.io/s/naughty-pond-3e5jp</a></p>