Helper function for constructing items for CommandBar
and CommandBar.shinyInput
.
CommandBarItem(
key,
text,
onClick = setInputValue(inputId = key, value = 0, event = TRUE),
...
)
Item suitable for use in the CommandBar
and CommandBar.shinyInput
.
Key of the item.
Text to be displayed on the menu.
A JS function that runs on item click. By default it sends input value to input[[key]]
.
If used within CommandBar.shinyInput
, it will send the value to the input ID specified
in inputId
argument of CommandBar.shinyInput
.
Additional props to pass to CommandBarItem.
CommandBar