Skip to content

dreamRs/shinyvs

Repository files navigation

shinyvs

Lifecycle: experimental R-CMD-check

Virtual Select widget for shiny applications built for performance. Powered by virtual-select.

🚨 🚨 🚨 This widget is now available in package shinyWidgets (>= 0.7.0 on CRAN) 🚨 🚨 🚨

Installation

You can install the development version of shinyvs from GitHub with:

# install.packages("remotes")
remotes::install_github("dreamRs/shinyvs")

Example

Minimal example with 97310 choices from babynames package:

library(shiny)
library(shinyvs)

ui <- fluidPage(
  tags$h2("Virtual Select example"),
  
  virtualSelectInput(
    inputId = "single",
    label = "Single select (with 97310 choices) :",
    choices = sort(unique(babynames::babynames$name)),
    search = TRUE
  ),
  verbatimTextOutput("res_single")
)

server <- function(input, output, session) {
  output$res_single <- renderPrint(input$single)
}

shinyApp(ui, server)

Development

This package use {packer} to manage JavaScript assets, see packer's documentation for more.

Install nodes modules with:

packer::npm_install()

Modify srcjs/inputs/virtual-select.js, then run:

packer::bundle()

Re-install R package and try virtualSelectInput() function.

About

Virtual Select widget for shiny apps

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published