Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamRs/shinyvs
Virtual Select widget for shiny apps
https://github.com/dreamRs/shinyvs
r shiny shinyapps
Last synced: about 2 months ago
JSON representation
Virtual Select widget for shiny apps
- Host: GitHub
- URL: https://github.com/dreamRs/shinyvs
- Owner: dreamRs
- License: other
- Created: 2022-01-14T18:13:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T14:58:41.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:12:04.225Z (6 months ago)
- Topics: r, shiny, shinyapps
- Language: R
- Homepage:
- Size: 307 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - dreamRs/shinyvs - Virtual Select widget for shiny apps (R)
README
# shinyvs
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/dreamRs/shinyvs/workflows/R-CMD-check/badge.svg)](https://github.com/dreamRs/shinyvs/actions)Virtual Select widget for [shiny](https://shiny.rstudio.com/) applications built for performance. Powered by [virtual-select](https://github.com/sa-si-dev/virtual-select).
:rotating_light: :rotating_light: :rotating_light: This widget is now available in package [shinyWidgets](https://github.com/dreamRs/shinyWidgets) (>= 0.7.0 on CRAN) :rotating_light: :rotating_light: :rotating_light:
## Installation
You can install the development version of shinyvs from [GitHub](https://github.com/dreamRs/shinyvs) with:
``` r
# install.packages("remotes")
remotes::install_github("dreamRs/shinyvs")
```## Example
Minimal example with 97310 choices from [babynames](https://github.com/hadley/babynames) package:
``` r
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}](https://github.com/JohnCoene/packer) to manage JavaScript assets, see packer's [documentation](https://packer.john-coene.com/#/) for more.
Install nodes modules with:
```r
packer::npm_install()
```Modify `srcjs/inputs/virtual-select.js`, then run:
```r
packer::bundle()
```Re-install R package and try `virtualSelectInput()` function.