Skip to content

Commit

Permalink
fix: broken example
Browse files Browse the repository at this point in the history
  • Loading branch information
kanata2 committed Jun 2, 2022
1 parent b2bdf74 commit dedc97c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/modal_users/users.go
Expand Up @@ -38,12 +38,13 @@ func main() {
// Section with users select - this input will not be included in the view_submission's view.state.values,
// but instead be sent as a "block_actions" request
additionalInviteeText := slack.NewTextBlockObject(slack.PlainTextType, "Invitee from complete list of users", false, false)
additionalInviteeHintText := slack.NewTextBlockObject(slack.PlainTextType, "", false, false)
additionalInviteeOption := slack.NewOptionsSelectBlockElement(slack.OptTypeUser, additionalInviteeText, "user")
additionalInviteeSection := slack.NewSectionBlock(additionalInviteeText, nil, slack.NewAccessory(additionalInviteeOption))

// Input with users select - this input will be included in the view_submission's view.state.values
// It can be fetched as for example "payload.View.State.Values["user"]["user"].SelectedUser"
additionalInviteeBlock := slack.NewInputBlock("user", additionalInviteeText, additionalInviteeOption)
additionalInviteeBlock := slack.NewInputBlock("user", additionalInviteeText, additionalInviteeHintText, additionalInviteeOption)

checkboxTxt := slack.NewTextBlockObject(slack.PlainTextType, "Checkbox", false, false)
checkboxOptions := createOptionBlockObjects([]string{"option 1", "option 2", "option 3"}, false)
Expand Down
1 change: 1 addition & 0 deletions workflow_step_test.go
Expand Up @@ -124,6 +124,7 @@ func configModalBlocks() Blocks {
inputBlock := NewInputBlock(
IDSelectOptionBlock,
NewTextBlockObject("plain_text", "Select an option", false, false),
NewTextBlockObject("plain_text", "Hint", false, false),
selection,
)

Expand Down

0 comments on commit dedc97c

Please sign in to comment.