I want to create a shiny datatable that highlights the cell that the user's mouse is hoovering on, in a way that it highlights the cells in the same row and column up that point. It's similar to what is displayed here: https://datatables.net/examples/api/highlight.html
But in this example, the entire column is highlighted, and I want it to stop on the cell that the mouse is on.
I have seen other questions with similar problems, like this one: R shiny mouseover text for table columns . But I don't know if it is outdated, but that code does not work for me, it just displays a normal datatable.
Using the code bellow as an example, how can I achieve this?
library(shiny)
shinyApp(
ui = fluidPage(
DT::dataTableOutput("mtcarsTable")
),
server = function(input, output) {
output$mtcarsTable <- DT::renderDataTable({
DT::datatable(datasets::mtcars[,1:3],
options = list(rowCallback = JS()
)
)
})
}
)