[x] Include relevant code or preferably a code sandbox
Describe the bug
If i want to control the selected rows with the selectableRowSelected and onSelectedRowsChange properties and at the same time filter the data given to the table, it will result by a loss of the selected rows which are no longer displayed due to the filtering.
Filter the table with the input in the header. Look for "Richard" per exemple
You can see now only 1 row is selected. If you remove the filter in the input to show all the rows, you will see as well that there is only the row displayed by the filter which is still selected
Issue Check list
styled-components
Describe the bug
If i want to control the selected rows with the
selectableRowSelected
andonSelectedRowsChange
properties and at the same time filter the data given to the table, it will result by a loss of the selected rows which are no longer displayed due to the filtering.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Keep the rows selected even if we filter
Code Sandbox, Screenshots, or Relevant Code
https://codesandbox.io/s/react-data-table-component-typescript-forked-noudn4?file=/src/index.tsx
Versions (please complete the following information)