react-data-table-component
react-data-table-component copied to clipboard
beforeSelectedRowChange
It would be nice to have a beforeSelectedRowChange() callback In my case I want to allow rows to be selected until such time as a total accumulator reaches a certain value. If I go over that value then I do not want the checkbox checked.
https://miteholdings-my.sharepoint.com/:i:/g/personal/miteholdings_miteholdings_onmicrosoft_com/ER_zPhVXRWpCmriG5Yr6kgsBVl7PEKpA6L90knWutmVBFg?e=JnpoDg
You may be looking for selectableRowDisabled
which takes a callback against the data to determine if the row select should be disabled
https://github.com/jbetancur/react-data-table-component#row-selection
@Intelliflex I am just going over open tickets and I realized my answer is not what you were asking 😬
I suppose we could have some call back that is exposed as you suggest to pre-check the number of rows checked.
Thanks John,
I am working around this issue ok, I just try and avoid reiterating over table unless I have to.
Cheers Mike and thanks for the great library
Ps: At some stage I might package my crud (editor, entry grids ) library built around RDT. It would need to be reworked a bit to remove dependence on MDB (and is also functional component reliant, extensively using hooks) but would be a good side project to accompany RDT.
Mike Thomson Intelliflex Software Ph: 0431 817772
From: John Betancur [email protected] Sent: Monday, June 29, 2020 12:53:32 AM To: jbetancur/react-data-table-component [email protected] Cc: Mike Thomson [email protected]; Mention [email protected] Subject: Re: [jbetancur/react-data-table-component] beforeSelectedRowChange (#598)
@Intelliflexhttps://github.com/Intelliflex I am just going over open tickets and I realized my answer is not what you were asking 😬
I suppose we could have some call back that is exposed as you suggest to pre-check the number of rows checked.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/jbetancur/react-data-table-component/issues/598#issuecomment-650774086, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AL6F6V3ZUZPSD5MRIDNQO3DRY5KOZANCNFSM4NTI6N3Q.