add_notie_input: Implemente la fonction date de la librairie JS notie

View source: R/add_notie_input.R

add_notie_inputR Documentation

Implemente la fonction date de la librairie JS notie

Description

Implemente la fonction date de la librairie JS notie

Usage

add_notie_input(
  inputId = "input",
  text = "Input notie",
  submitText = "Valider",
  cancelText = "Annuler",
  position = "top",
  autocapitalize = "none",
  autocomplete = "off",
  autocorrect = "off",
  autofocus = TRUE,
  inputmode = "latin",
  max = 10000,
  maxlength = NULL,
  min = NULL,
  minlength = NULL,
  placeholder = "Entrez un texte",
  value = "",
  spellcheck = FALSE,
  step = NULL,
  type = "text",
  session
)

Arguments

inputId

id qui va contenir la reponse de l'appel à la notif (TRUE/FALSE)

text

titre de l'input

submitText

texte de la case de validation de la notif

cancelText

texte de la case de refus de la notif

position

position de la notif : string ('top', 'bottom')

autocapitalize

boolean

autocomplete

boolean

autocorrect

boolean

autofocus

boolean

inputmode

char

max

integer

maxlength

integer

min

integer

minlength

integer

placeholder

placeholder

value

valeur par défaut

spellcheck

boolean

step

integer

type

text

session

argument session shiny

Details

https://github.com/jaredreich/notie

https://codingshiksha.com/javascript/notie-js-javascript-alert-toast-notification-library-full-tutorial-with-examples/

Value

une alerte notie

Examples

## Not run: library(shiny)
library(shinyYM)

ui <- fluidPage(
  add_notie_deps(),
  actionButton(inputId = "b1", "input"),
  verbatimTextOutput("input")
)

server <- function(input, output, session) {

  observeEvent(input$b1, {

    add_notie_input(inputId = "input",
                    text = "Input notie",
                    submitText = "Valider",
                    cancelText = "Annuler",
                    position = "top",
                    autocapitalize = "none",
                    autocomplete = "off",
                    autocorrect = "off",
                    autofocus = TRUE,
                    inputmode = "latin",
                    max = 10000,
                    maxlength = NULL,
                    min = NULL,
                    minlength = NULL,
                    placeholder = "Entrez un texte",
                    value = "",
                    spellcheck = FALSE,
                    step = NULL,
                    type = "text",
                    session)

  })

  output$input <- renderPrint(input$input)
}

# Run the application
shinyApp(ui = ui, server = server)

## End(Not run)

ymansiaux/shinyYM documentation built on March 20, 2022, 11:53 p.m.