How to lock table records from being selected, depending on other selected Records
What I am trying to do:
I have a hierarchical structure of groups (example slugs):
The requirement I am facing is, that when any of those related groups are selected for the Bulk Action via the Resource Table (checkbox), the other related groups will not be selectable anymore and greyed-out or have a "-" in the checkbox or sth to signify, that they are not selectable anymore. (e.g.: Select A -> B and C are not selectable anymore)
I tried to find some kind of hook or event that gets fired when a record is selected for a bulk action, but wasn't able to find anything. I would be very grateful, if somebody could point me in the right direction of where to start to look.
Just as a hint where we are in the code:
I have a hierarchical structure of groups (example slugs):
- GroupA
- GroupA/GroupB
- GroupA/GroupC
The requirement I am facing is, that when any of those related groups are selected for the Bulk Action via the Resource Table (checkbox), the other related groups will not be selectable anymore and greyed-out or have a "-" in the checkbox or sth to signify, that they are not selectable anymore. (e.g.: Select A -> B and C are not selectable anymore)
I tried to find some kind of hook or event that gets fired when a record is selected for a bulk action, but wasn't able to find anything. I would be very grateful, if somebody could point me in the right direction of where to start to look.
Just as a hint where we are in the code: