Skip to content

Reactable Pagination Switches to Page One on Selection in Crosstalk Object #147

@msaltieri

Description

@msaltieri

Issue description

When utilizing a crosstalk object within a reactable featuring row selection, an unexpected behavior occurs where, upon selecting a row on a page greater than 1, the reactable pagination immediately switches to page one. This behavior is not in line with the anticipated user experience.

Reproducible example

library(shiny)
library(crosstalk)
library(reactable)

ui <- fluidPage(
  titlePanel("Test Reactable With Crosstalk"),
  fluidRow(
    column(
      12,
      reactableOutput("tab")
    )
  )
)

server <- function(input, output) {
  data <- SharedData$new(
    data.frame(id = 1:50, value = rnorm(50))
  )
  output[["tab"]] <- renderReactable(
    reactable(
      data = data,
      selection = "multiple"
    )
  )
}

shinyApp(ui = ui, server = server)

Expected Behavior

The pagination should not switch to page one upon selecting a row. The selected row should remain highlighted, allowing the user to continue interacting with the reactable on the current page.

Actual Behavior

Upon selecting a row on a page greater than 1, the pagination immediately switches to page one.

Session Info

version  R version 4.3.2 (2023-10-31)
os       macOS Sonoma 14.0
system   x86_64, darwin20
ui       RStudio
language (EN)
collate  it_IT.UTF-8
ctype    it_IT.UTF-8
tz       Europe/Rome
date     2023-11-22
rstudio  2023.09.1+494 Desert Sunflower (desktop)
pandoc   2.15 @ /usr/local/bin/pandoc

Additional Information

  • Crosstalk version: 1.2.0.9000 (d754a21)
  • Reactable version: 0.4.4
  • Shiny version: 1.7.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions