I am trying to create a datatable that only allows a single selection. I know there is a single mode but that uses radio buttons and I need to be able to clear the selection. I cannot find a way to clear the selection once a radio is selected, additionally the radio remains selected even when applying custom dataset filters (index one remains index one selected even after reloading dataset).
What I am trying to do is create a callback that will, in the event more than one checkbox is ticked, pop the first item from the selected rows list, and return the list of only the newest selected checkbox thus unchecking the popped item.
- The first row is selected so ‘selected_rows’ is list
- The second row is selected so ‘selected_rows’ is list[0, 1]
a. The callback performs selected_rows.pop(0) thereby removing the first item from the list so ‘selected_rows’ is list
- The new ‘selected_rows’ list is Output to the datatable and only the returned list indicies are selected
This is what I currently have setup however it just flat out does not work. I have not had any luck searching for answers for the last two days so any help would be appreciated.