Skip to contents

Unregisters placeholders added with ptr_define_placeholder_value(), ptr_define_placeholder_consumer(), or ptr_define_placeholder_source(). The five built-in placeholders (ppVar, ppText, ppNum, ppExpr, ppUpload) and the two structural keywords (ppLayerOff, ppVerbSwitch) are never removed.

Usage

ptr_clear_placeholder(keyword = NULL)

Arguments

keyword

Optional single string. When supplied, only that placeholder is removed. When omitted (the default), every user-registered placeholder is removed.

Value

The character vector of keywords that were removed, invisibly.

Examples

ptr_define_placeholder_value(
  "demo_kw",
  build_ui = function(node, ...) shiny::textInput(node$id, "demo"),
  resolve_expr = function(value, node, ...) value
)
#> function (x, ...) 
#> x
#> <bytecode: 0x5558f1b3ec88>
#> <environment: 0x5558f20ec5e8>
ptr_clear_placeholder("demo_kw")
#>  Cleared placeholder: "demo_kw".