Input elements don't work as expected when in a grid container
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Run the provided Shiny reproduction and start at the gridstackOutput and gs_item entry points used to place selectInput inside the grid. Trace why the input stops responding despite retaining shiny-bound-input, then verify that inputs embedded in grid items work and that the example still behaves correctly.
Written by the indexing model from the issue text.
Description
Hi @pvictor!
When I put input element within a grid, they stop working. That said, I still see the class shiny-bound-input, so I don't see why it should not work:
library(shiny)
library(bslib)
library(ggplot2)
library(gridstackr)
library(sortable)
ui <- page_fillable(
tags$h2("GridStack example"),
layout_sidebar(
sidebar = sidebar(
width = 300,
gridstackOutput("bucket")
),
gs_trash(id = "mytrash", label = "Drag here to remove", height = "50px"),
gridstackOutput("dashboard")
)
)
server <- function(input, output, session) {
output$bucket <- renderGridstack({
gridstack(
disableResize = TRUE,
column = 1,
options = list(
acceptWidgets = TRUE,
dragOut = TRUE
),
gs_item(
selectInput("variable", "Variable:",
c("Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear")),
tableOutput("data")
))
})
output$dashboard <- renderGridstack({
gridstack(
margin = "10px",
cellHeight = "140px",
resize_handles = "all",
float = TRUE,
options = list(
acceptWidgets = TRUE
),
trash_id = "mytrash"
)
})
observeEvent(input$dashboard_layout, {
print(input$dashboard_layout)
})
output$data <- renderTable({
mtcars[, c("mpg", input$variable), drop = FALSE]
}, rownames = TRUE)
}
shinyApp(ui, server)
- Dominant language
- R
- Stars
- 24
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
eduaguilera/whep#1489 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug code cleaning
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
furrer-lab/abn#272 ·
-
R CMD check red on main: load_* loader tests fail (2026-season release assets not published yet)Open
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
sportsdataverse/hoopR#227 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
philchalmers/SimDesign#106 ·