jrowen / rhandsontable

A htmlwidgets implementation of Handsontable.js
http://jrowen.github.io/rhandsontable/
Other
380 stars 147 forks source link

Added rows repeat row name if initial data has only one row #436

Open jswanson436 opened 5 months ago

jswanson436 commented 5 months ago

If I create an rhandsontable initially with only one row and then add rows using the right-click functionality they all get labeled '1', like so:

image

Interestingly, if I provide initial data with multiple rows, then remove all but one using the interactive functionality, and then add some more, it works fine. Here's a simple Shiny app that reproduces the issue:

library(shiny)
library(rhandsontable)

ui <- fluidPage(
  rHandsontableOutput("test_hot")
)

server <- function(input, output, session) {
  output$test_hot <- renderRHandsontable({
    df <- data.frame(id = 1, val = 2)
    rhandsontable(df)
  })
}

shinyApp(ui, server)