如何在松弛状态下停止来自模态输入部分的发布请求?

时间:2020-01-29 10:53:30

标签: slack-api slack-commands

我在松弛状态下创建了一个模态,该模态在某些命令下被调用。提交模式时,HTTP Post请求将发送到交互式组件中的指定URL,但是每次我编辑 assetname 输入列时,也会发送HTTP Post请求。如何停止呢? 下面是我创建的JSON,并且在模式的任何其他字段中进行更改时也不会发送请求。

{
  "type": "modal",
  "title": {
    "type": "plain_text",
    "text": "Asset Details",
    "emoji": true
  },
  "submit": {
    "type": "plain_text",
    "text": "Create Record",
    "emoji": true
  },
  "close": {
    "type": "plain_text",
    "text": "Cancel",
    "emoji": true
  },
  "blocks": [
    {
      "type": "divider"
    },
    {
      "block_id": "assetname",
      "type": "input",
      "element": {
        "type": "plain_text_input",
        "action_id": "asset_name"
      },
      "label": {
        "type": "plain_text",
        "text": "Asset Name",
        "emoji": true
      }
    },
    {
      "type": "input",
      "block_id": "relatedguild",
      "element": {
        "type": "static_select",
        "action_id": "guild",
        "placeholder": {
          "type": "plain_text",
          "text": "Select an item",
          "emoji": true
        },
        "options": [
          {
            "text": {
              "type": "plain_text",
              "text": "B2B Marketing Automation",
              "emoji": true
            },
            "value": "B2B Marketing Automation"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "B2C Marketing Automation",
              "emoji": true
            },
            "value": "B2C Marketing Automation"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Community Cloud",
              "emoji": true
            },
            "value": "Community Cloud"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "CPQ",
              "emoji": true
            },
            "value": "CPQ"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Data Analytics",
              "emoji": true
            },
            "value": "Data Analytics"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Data Core",
              "emoji": true
            },
            "value": "Data Core"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Declarative Core",
              "emoji": true
            },
            "value": "Declarative Core"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Development Process",
              "emoji": true
            },
            "value": "Development Process"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Full Stack",
              "emoji": true
            },
            "value": "Full Stack"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Non-Profit Industry",
              "emoji": true
            },
            "value": "Non-Profit Industry"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Project Management",
              "emoji": true
            },
            "value": "Project Management"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Service Cloud",
              "emoji": true
            },
            "value": "Service Cloud"
          }
        ]
      },
      "label": {
        "type": "plain_text",
        "text": "Related Guild",
        "emoji": true
      }
    },
    {
      "type": "input",
      "block_id": "cloudsImpacted",
      "element": {
        "type": "static_select",
        "action_id": "clouds",
        "placeholder": {
          "type": "plain_text",
          "text": "Select an item",
          "emoji": true
        },
        "options": [
          {
            "text": {
              "type": "plain_text",
              "text": "None",
              "emoji": true
            },
            "value": "None"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Sales",
              "emoji": true
            },
            "value": "Sales"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Service",
              "emoji": true
            },
            "value": "Service"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Community",
              "emoji": true
            },
            "value": "Community"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Marketing",
              "emoji": true
            },
            "value": "Marketing"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Field Service",
              "emoji": true
            },
            "value": "Field Service"
          }
        ]
      },
      "label": {
        "type": "plain_text",
        "text": "Clouds Impacted",
        "emoji": true
      }
    },
    {
      "block_id": "description",
      "type": "input",
      "element": {
        "action_id": "descact",
        "type": "plain_text_input",
        "multiline": true
      },
      "label": {
        "type": "plain_text",
        "text": "Description",
        "emoji": true
      }
    }
  ]
}

0 个答案:

没有答案
相关问题