Skip to contents

Split an input value into a named vector.

Usage

input_decode(x)

Arguments

x

the (input) value to decode.

Value

a named vector c(namespace, action, value) or c(action, value).

Details

The function is used together with action_link() / onclick_event() when their value is left to the HTML tag id.

The expected pattern for x is "namespace-action_value" or "action_value". More complex use cases should be covered using a list value in action_link().

Examples

input_decode("module1-add_leg_896")
#> namespace    action     value 
#> "module1" "add_leg"     "896" 
input_decode("add_leg_896")
#>    action     value 
#> "add_leg"     "896"