Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift + Click in datagrid() checkbox columns generated by grid_selection_row() does not update selection return values #40

Open
scconner7 opened this issue Jan 18, 2024 · 0 comments

Comments

@scconner7
Copy link

Description:

Shift + Left Click multi-row range selection in datagrid() checkbox columns generated by grid_selection_row() visually updates all checkboxes in the selection range but does not actually update the selection return values. The gif below was created using the reprex app from your documentation without any edits (besides slight theming) and, I believe, illustrates the issue very clearly.

Recording 2024-01-18 at 14 11 13

Reprex app code:

library(shiny)
library(toastui)

ui <- fluidPage(
  tags$h2("datagrid row selection"),
  fluidRow(
    column(
      width = 6,
      datagridOutput("grid_checkbox"),
      verbatimTextOutput("res_checkbox")
    ),
    column(
      width = 6,
      datagridOutput("grid_radio"),
      verbatimTextOutput("res_radio")
    )
  )
)

server <- function(input, output, session) {

  df <- data.frame(
    index = 1:12,
    month = month.name,
    letters = letters[1:12]
  )

  output$grid_checkbox <- renderDatagrid({
    datagrid(df) %>%
      grid_selection_row(
        inputId = "sel_check",
        type = "checkbox"
      )
  })

  output$res_checkbox <- renderPrint({
    input$sel_check
  })

  output$grid_radio <- renderDatagrid({
    datagrid(df) %>%
      grid_selection_row(
        inputId = "sel_radio",
        type = "radio"
      )
  })

  output$res_radio <- renderPrint({
    input$sel_radio
  })

}

if (interactive())
  shinyApp(ui, server)

Desired Resolution:

Shift + Left Click should continue to visually update checkboxes in the selection range and also be fixed to update the actual selection return values as well.

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant