From 90a7142afadc5f35b313115881b04cd102929aed Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 3 Jan 2024 10:03:47 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20dreamRs/?= =?UTF-8?q?shinyWidgets@7641372208e9a2c090d631ce8b92c807c4564368=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgdown.yml | 2 +- reference/searchInput.html | 51 +++++++++++++++++++++----------------- search.json | 2 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/pkgdown.yml b/pkgdown.yml index abfc4c47..06447acb 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.19.2 pkgdown: 2.0.7 pkgdown_sha: ~ articles: {} -last_built: 2024-01-02T10:04Z +last_built: 2024-01-03T10:03Z urls: reference: https://dreamrs.github.io/shinyWidgets/reference article: https://dreamrs.github.io/shinyWidgets/articles diff --git a/reference/searchInput.html b/reference/searchInput.html index 9eb9c689..2ffa23d0 100644 --- a/reference/searchInput.html +++ b/reference/searchInput.html @@ -58,6 +58,7 @@

Usage placeholder = NULL, btnSearch = NULL, btnReset = NULL, + btnClass = "btn-default btn-outline-secondary", resetValue = "", width = NULL ) @@ -89,8 +90,12 @@

Arguments, +

Value used when reset button is clicked, default to "" (empty string), if NULL value is not reset.

@@ -100,40 +105,40 @@

Arguments

Note

-

The two buttons ('search' and 'reset') act like actionButton, you can +

The two buttons ('search' and 'reset') act like shiny::actionButton(), you can retrieve their value server-side with input$<INPUTID>_search and input$<INPUTID>_reset.

See also

-

updateSearchInput to update value server-side.

+

updateSearchInput() to update value server-side.

Examples

-
if (interactive()) {
-  ui <- fluidPage(
-    tags$h1("Search Input"),
-    br(),
-    searchInput(
-      inputId = "search", label = "Enter your text",
-      placeholder = "A placeholder",
-      btnSearch = icon("magnifying-glass"),
-      btnReset = icon("xmark"),
-      width = "450px"
-    ),
-    br(),
-    verbatimTextOutput(outputId = "res")
-  )
+    
library(shiny)
+library(shinyWidgets)
 
-  server <- function(input, output, session) {
-    output$res <- renderPrint({
-      input$search
-    })
-  }
+ui <- fluidPage(
+  # theme = bslib::bs_theme(version = 5L, preset = "bootstrap"),
+  tags$h1("Search Input"),
+  br(),
+  searchInput(
+    inputId = "search", label = "Enter your text",
+    placeholder = "A placeholder",
+    btnSearch = icon("magnifying-glass"),
+    btnReset = icon("xmark"),
+    width = "450px"
+  ),
+  br(),
+  verbatimTextOutput(outputId = "res")
+)
 
-  shinyApp(ui = ui, server = server)
+server <- function(input, output, session) {
+  output$res <- renderPrint(input$search)
 }
 
+if (interactive())
+  shinyApp(ui = ui, server = server)