This is like a cross between a button and a select menu when a user clicks on this overflow button, they will be presented with a list of options to choose from. Unlike the select menu, there is no typeahead field, and the button always appears with an ellipsis ("…") rather than customisable text.

overflow_menu(id, options, confirm = NULL)

Arguments

id

character, An identifier for the action triggered when a menu option is selected.

options

An list of block_option objects.

confirm

A confirm object that defines an optional confirmation dialog that appears after a menu item is selected.

Value

block menu class

Details

Works with block types: Section, Actions

See also

Examples

section_block( id = 'section 890', text = block_text('This is a section block with an overflow menu.'), accessory = overflow_menu( id = 'overflow', options = as.blocks( lapply(sprintf('value-%d',1:4),block_option, text = '*this is plain_text text*') ) ) )
#> { #> "type": "section", #> "text": { #> "type": "mrkdwn", #> "text": "This is a section block with an overflow menu." #> }, #> "block_id": "section 890", #> "accessory": { #> "type": "overflow", #> "action_id": "overflow", #> "options": [ #> { #> "text": { #> "type": "plain_text", #> "text": "*this is plain_text text*" #> }, #> "value": "value-1" #> }, #> { #> "text": { #> "type": "plain_text", #> "text": "*this is plain_text text*" #> }, #> "value": "value-2" #> }, #> { #> "text": { #> "type": "plain_text", #> "text": "*this is plain_text text*" #> }, #> "value": "value-3" #> }, #> { #> "text": { #> "type": "plain_text", #> "text": "*this is plain_text text*" #> }, #> "value": "value-4" #> } #> ] #> } #> }