react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

beforeSelectedRowChange

Open Intelliflex opened this issue 4 years ago • 3 comments

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

Intelliflex avatar Jun 05 '20 07:06 Intelliflex

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

jbetancur avatar Jun 08 '20 16:06 jbetancur

@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.

jbetancur avatar Jun 28 '20 14:06 jbetancur

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.

Intelliflex avatar Jun 28 '20 22:06 Intelliflex