Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Input elements don't work as expected when in a grid container

Open
#2 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
frontend, web-dev

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.