updateQueryBuilder {jqbr} | R Documentation |
updateQueryBuilder
Description
Update a queryBuilder with available methods.
Usage
updateQueryBuilder(
inputId,
setFilters = NULL,
addFilter = NULL,
setRules = NULL,
destroy = FALSE,
reset = FALSE,
session = shiny::getDefaultReactiveDomain()
)
Arguments
inputId |
inputId of builder to update. |
setFilters |
list of lists container new filters. |
addFilter |
Named list containing |
setRules |
List of rules apply to the builder. |
destroy |
bool. |
reset |
bool. |
session |
The session object passed to function given to shinyServer. Default is getDefaultReactiveDomain(). |
Value
An updated queryBuilderInput()
Examples
library(shiny)
library(jqbr)
# Button to reset the build an remove all rules
ui <- fluidPage(
useQueryBuilder(),
queryBuilderInput(
inputId = "qb",
filters = list(
list(
id = "name",
type = "string"
)
)
),
actionButton("reset", "Reset")
)
server <- function(input, output) {
observeEvent(input$reset, {
updateQueryBuilder(
inputId = "qb",
reset = TRUE
)
})
}
if (interactive()) {
shinyApp(ui, server)
}
[Package jqbr version 1.0.3 Index]