In the code below from https://glin.github.io/reactable/articles/examples.html#cross-widget-interactions, I'd like to be able to highlight the row entry by clicking on the map icon, i.e. the reverse of clicking on the table entry.
Is that possible (without Shiny)?
library(crosstalk)
library(leaflet)
library(dplyr)
# A SpatialPointsDataFrame for the map.
# Set a group name to share data points with the table.
brew_sp <- SharedData$new(breweries91, group = "breweries")
# A regular data frame (without coordinates) for the table.
# Use the same group name as the map data.
brew_data <- as_tibble(breweries91) %>%
select(brewery, address, village, founded) %>%
SharedData$new(group = "breweries")
map <- leaflet(brew_sp) %>%
addTiles() %>%
addMarkers()
tbl <- reactable(
brew_data,
selection = "multiple",
onClick = "select",
rowStyle = list(cursor = "pointer"),
minRows = 10
)
htmltools::browsable(
htmltools::tagList(map, tbl)
)