numbats / numbathack18

Repository for the NUMBAT local hackathon 2018
0 stars 0 forks source link

Package for replicating shiny inputs/objects #3

Open mitchelloharawild opened 6 years ago

mitchelloharawild commented 6 years ago

Fairly recently I've come up with a method in Shiny to create inputs and extract the user inputs dynamically. For example, this can be used to add multiple filters on the dataset, and provide multiple text input areas (for example, sharing data with multiple emails). image

It would be nice to formalise this method and create a convenient package for others to use. Currently, it requires a substantial amount of code to work, most of which is passing information between modules and parents (https://shiny.rstudio.com/articles/modules.html). I expect this can be replaced with a single function call, which returns a list of values typically expected from the input field used.

There appears to be substantial interest in this functionality for Shiny, a brief search yields these posts:

The issue with the proposed solutions here is that they do not handle deleting input fields, retention of user inputs, and it is difficult to extract the user inputs. All of these issues are resolved using my current method 😄

NTomasetti commented 6 years ago

I'm happy to help with this

mitchelloharawild commented 6 years ago

Here are the reproducible examples of this functionality: https://github.com/mitchelloharawild/ShinyExperiments/tree/master/ReplicableUI

mitchelloharawild commented 6 years ago

The repository for this package is here: https://github.com/mitchelloharawild/shinyrepio