Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Dispatch Action Config for Plain Text Input #204

Closed
raycharius opened this issue Oct 17, 2020 · 2 comments · Fixed by #205
Closed

Support for Dispatch Action Config for Plain Text Input #204

raycharius opened this issue Oct 17, 2020 · 2 comments · Fixed by #205
Labels
enhancement New feature or request

Comments

@raycharius
Copy link

As seen here: https://api.slack.com/reference/block-kit/block-elements#input

@yhatt yhatt added the enhancement New feature or request label Oct 18, 2020
@yhatt
Copy link
Owner

yhatt commented Oct 19, 2020

Thanks to mention for lost part of dispatchAction. In jsx-slack, it would become to the extra option of dispatchAction prop: <Input dispatchAction={["onEnterPressed", "onCharacterEntered"]}>.

@yhatt
Copy link
Owner

yhatt commented Oct 20, 2020

Done in #205. The configurable dispatchAction prop is going to come in the next release.

https://speee-jsx-slack.netlify.app/#jsx:eJyz8cjPTbXjUlCw8cwrKC1RyElMSs2xVQpOTSxKzlBSSMksLkgsSc5wTC7JzM-zVcrPc80rSS0KKEotLk5NUVLQt-Oy0QcbAQCB_Rha

<Home>
  <Input label="Search" dispatchAction="onEnterPressed" />
</Home>
{
  "type": "home",
  "blocks": [
    {
      "type": "input",
      "label": {
        "type": "plain_text",
        "text": "Search",
        "emoji": true
      },
      "optional": true,
      "dispatch_action": true,
      "element": {
        "type": "plain_text_input",
        "dispatch_action_config": {
          "trigger_actions_on": [
            "on_enter_pressed"
          ]
        }
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants