Based on this example, I am trying to select only a single row and consequently highlight a single point.
I have changed the line datatable(cars) to datatable(cars,selection = 'single') as per the documentation which limits the selection to only one row.
However, after selecting more than once even though only one row is highlighted all previous points stay highlighted.
Is there a way of ensuring that only one row is returned from the selection i.e. that all previous selections are cleared?
Thanks
This is a bug in DT, and I just fixed it (sorry about that). There are two ways to solve the problem, and you can use either one:
renderDataTable(server = FALSE)
if your data object is not too big.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With