slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
571 stars 212 forks source link

Slack customize modal in LayoutBlock #1222

Closed RedHoes closed 11 months ago

RedHoes commented 11 months ago

(Describe your issue and goal here)

This is my code which create a pop-up modal

    SectionBlock.builder().text(
      MarkdownTextObject.builder()
        .text("*Repository*")
        .build()
    ).accessory(
      StaticSelectElement.builder()
        .placeholder(
          PlainTextObject.builder()
            .text("Select an option").build()
        )
        .options(
          repoList.map { optionText ->
            OptionObject.builder()
              .text(
                PlainTextObject.builder()
                  .text(optionText)
                  .build()
              )
              .value(optionText)
              .build()
          }
        )
        .actionId(SlackSelectElementConstants.selectGithubRepo)
        .build()
    ).build()
    )

Screenshot from 2023-10-18 15-21-50

Expected result:

(Tell what you expected to happen)

Actual result:

(Tell what actually happened with logs, screenshots)

Requirements

Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.