The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Using Crosstalk

The rsc_table(), rsc_grid(), rsc_search(), and rsc_filter() widgets use crosstalk to facilitate inter-widget communication. In simple cases, passing identical results from the content() tibble is sufficient:

library(connectwidgets)
library(dplyr)
library(purrr)
library(htmltools)

client <- connect()
all_content <- client %>% content()
some_content <- slice_sample(all_content, prop = .1)

tagList(
  rsc_cols(rsc_search(some_content), rsc_filter(some_content)),
  rsc_table(some_content)
)

For more complicated layouts, you may want to pass your own crosstalk objects to the components.

Example: Grids grouped by owner

As a publisher, you want to:

crosstalk::SharedData$new() takes two optional parameters that make this possible:

Since the some_content tibble contains all the GUIDs, passing it to the Search and Filter components will enable you to search across each of the subset tibbles created by dplyr::group_nest:

some_content_xfilter <- crosstalk::SharedData$new(
  some_content,
  key = ~ guid,
  group = "xfilter"
  )

rsc_content_shared <-
  some_content %>%
  group_nest(owner_username, .key = "content_df", keep = TRUE)

div(
  h3("Grouped Grids by Owner", class = "text-center"),
  rsc_cols(rsc_search(some_content_xfilter), rsc_filter(some_content_xfilter)),
  purrr::pmap(
    rsc_content_shared,
    {
      ~ tagList(
        h4(..1),
        rsc_grid(crosstalk::SharedData$new(..2, key = ~ guid, group = "xfilter"))
      )
    }
  )
)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.