title: select all results to an infinite loop update error in react-table
body: <p><a href="https://codesandbox.io/s/react-table-with-hooks-forked-dp72w?file=/src/table.js" rel="nofollow noreferrer">Playground Sandbox</a>
  Just setup custom hooks for react-table to enable custom search and select all rows.
  Then  this happens when I select a single row, plus the select All option does not seem to work as expected. <a href="https://i.stack.imgur.com/ObGXF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ObGXF.png" alt="enter image description here" /></a></p>