New examples on authoring inputs
feddelegrand7 opened this issue · 3 comments
Could you please provide an additional example on how to implement a react element into a shiny input. Preferably, the react element should take some options. I've been trying all day to create a package from this react library https://caferati.me/demo/react-awesome-button/morty-theme which is quite simple however without concrete examples, it's impossible (at least for me) to do so.
Thank you very much in advance.
The example provided here https://react-r.github.io/reactR/articles/intro_inputs.html is great but it's a little bit confusing for me as the input doesn't take any argument, leaving the configuration argument of the createReactShinyInput() function empty.
There is also this code
updateButtonrInput <- function(session, inputId, value, configuration = NULL) {
message <- list(value = value)
if (!is.null(configuration)) message$configuration <- configuration
session$sendInputMessage(inputId, message);
}
I don't know if I have to modify it and if so how, I've read the tutorial and looked for the examples but no mention for it.
Man I've just found this :http://www.buildingwidgets.com/blog/2019/1/27/build-your-own-react-based-htmlwidget ! this is an absolutely awesome article and it's definitely worth putting it on the package's website.
Thank you for your amazing work !