Description
I am trying to implement a toggle button which has its own jsx inside one of the boostrap table's columns (for leftmost cell each row).
My issue is I can't seem to find a way to pass the parent's callback function from the react-bootstrap-table itself into a column formatter (i.e. there is no bind this allowed) such that a callback gets called from the parent that can change state based on whether someone hits the toggle button in each cell or not.
Basically my overall goal is to have some "parent rows" with expander button on left-hand most column and if a person hits that expander button it will change the state of a hiderow[] array of booleans and redraw the table data showing the once hidden child rows based on parent expansion. (These are basically the same display style as the parents, it's just that the parent expander button "uncoils them into view".)
Every other bit of the logic works in this pipeline except how to get a state-changing function passed to an external .jsx as a callback. Because as opposed to normal React parent-child interaction I have to somehow feed the callback function through the column formatter function, which seems to reside outside the React component that uses it (hence passing state functions not easy).
I have to go through the column formatter obviously because this toggle button appears on every single row and so has to be replicated, calling different ids, etc... I tried to use a generic column click event but lol can't get rowID from that nor grab the inner toggle imagebutton except for maybe low-level js. Similarly the row click event. (There does not appear to be a cell-click event but this too would need a further "zoom in" on the image button inside it).