Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Appsilon/weighted-picker-input
https://github.com/Appsilon/weighted-picker-input
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/Appsilon/weighted-picker-input
- Owner: Appsilon
- Created: 2023-03-22T09:55:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-23T08:52:59.000Z (over 1 year ago)
- Last Synced: 2024-07-29T15:38:56.846Z (about 2 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - Appsilon/weighted-picker-input - (JavaScript)
README
# weight-picker-input
To use weighted pickerInput in your application:
Add this to your `ui`:
```r
source("weightedPickerInput.R")
css <- sass(sass_file("www/css/styles.scss"))ui <- fluidPage(
theme = bs_theme(5),
# css + js needed for proper functionality
tags$head(tags$style(css)),
tags$head(tags$script(src = "js/index.js")),weightedPickerInput(
"car_options",
c("mpg", "disp", "hp", "drat", "wt", "qsec")
)
)
```Then you can access the input in `server`
```r
observeEvent(input$`car_options-stats_weights`, {
state <- input$`car_options-stats_weights`
weights <- state$weights
})
```