Single row selection in brilliant form using DT

Based on this example , I am trying to select only one row and therefore select one point.

I changed the datatable (cars) line to datatable (cars, selection = 'single') according to the documentation, which restricts the selection to only one line.

However, after selecting more than once, even if only one row is selected, all previous points remain highlighted.

Is there a way to ensure that only one row is returned from the selection, that is, all previous choices are cleared?

thanks

+7
r shiny
source share
1 answer

This is a bug in DT , and I just fixed it (sorry for that). There are two ways to solve the problem, and you can use one of them:

  • Install the development version on Github;
  • Or use renderDataTable(server = FALSE) if your data object is not too big.
+8
source share

All Articles