When working with datatables everything is clear - I can choose 5, 10, 25, 50 or 100 entries.
shinyApp(
ui = fluidPage(
fluidRow(
column(12,
dataTableOutput('table')
)
)
),
server = function(input, output) {
output$table <- DT::renderDataTable(iris)
}
)
Unfortunately, in rhandsontable I can not find proper solution. My only result looks that:
shinyApp(
ui = fluidPage(
fluidRow(
column(12,
rHandsontableOutput('table')
)
)
),
server = function(input, output) {
output$table <- renderRHandsontable(
rhandsontable(iris, width = 550, height = 300)
)
}
)
How can I enforce rhandsontable to give me selectinput with number of entries?
You can pass min/max rows/columns to the function: https://github.com/handsontable/handsontable/issues/225
library(shiny)
library(rhandsontable)
shinyApp(
ui = fluidPage(
fluidRow(
column(12,
sliderInput('input', label = "Rows",
min = 1, max = nrow(iris), value = 10)
),
column(12,
rHandsontableOutput('table')
)
)
),
server = function(input, output) {
output$table <- renderRHandsontable(
rhandsontable(iris, width = 550, height = 300, maxRows = input$input)
)
}
)

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With