Working with Row Selection State
selectedRows is really weird. When something is selected, it'll contain the row index and true, like { 1: true }. But every time something is deselected it will just be {}. I cannot rely on table.getSelectedRowModel().rows because it will only contain the selection at the time before updating the state. So it's always one behind. I need to get the selected rows and write them to context variable, so that it will always contain the currently selected selected rows, but it seems kinda impossible