ericrsmith35 / DatatableV2

28 stars 24 forks source link

allow clear selection for multi-row tables #68

Closed aundus closed 3 years ago

aundus commented 3 years ago

Hi Eric, while using the datatableV2 I noticed that the clear selection was being shown only when the table has one entry. Further, if the "clear selection" button was pressed, the state variable numberOfRowsSelected was not being updated which caused some routing errors in a flow I was creating. The changes in the PR would allow for the clear selection button to appear on multi row tables, and will set the numberOfRowsSelected variable back to zero when it is clicked. Feel free to reach out with any questions/concerns.

ericrsmith35 commented 3 years ago

I have fixed the numberOfRowsSelected variable issue in the current source repository. I'm not adding the Clear Selection button when multiple records are selected because that option is already available by clicking the checkbox on the header row.