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

sortableRadioButtons/sortableCheckboxGroupInput do not work when inlined #37

Closed
sam-harvey opened this issue Mar 5, 2019 · 1 comment

Comments

@sam-harvey
Copy link

It appears that when inlining these inputs the class of the input labels is changed to checkbox-inline/radio-inline, so they're not being picked up by the selector in the relevant functions.

e.g. the inline inputs are not sortable.

library(shiny)
library(shinyjqui)

ui <- fluidPage(
  sortableRadioButtons('test1', 'test', 1:3, inline = TRUE),
  sortableRadioButtons('test2', 'test', 1:3, inline = FALSE),
  sortableCheckboxGroupInput('test3', 'test', 1:3, inline = TRUE),
  sortableCheckboxGroupInput('test4', 'test', 1:3, inline = FALSE)
)

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

shinyApp(ui, server)

Because in sortableCheckboxGroupInput only .checkbox is selected, and likewise for the radioButtons.

  jqui_sortable(
    ui = shiny::checkboxGroupInput(
      inputId, label, choices, selected,
      inline, width, choiceNames,
      choiceValues
    ),
    options = list(items = ".checkbox", shiny = shiny_opt)
  )
@Yang-Tang
Copy link
Owner

Hi @sam-harvey, thank you so much for your contribution! I have merged your pull request.

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

2 participants