Skip to content

Options are not updated on slack external data drop down #833

@vasanthkanugo

Description

@vasanthkanugo

(Describe your issue and goal here)

The slack_bolt version

slack-bolt==1.16.1

Python runtime version

Python 3.9.10

OS info

Mac OS - Ventura - 13.1

Steps to reproduce:

@app.options(re.compile("(address_options)"))
def get_address_options(ack, payload):
    keyword = payload.get("value")
    autocomplete = get_maps_autocomplete(keyword)
    locations = [ location["description"] for location in autocomplete["predictions"]]
    options = get_maps_option(locations)
    print(f"options for {keyword} are {options}")
    ack(options=options)

Expected result:

Should show the updated options each time.

Actual result:

The following code snippet would call maps autocomplete function and get all the locations based on the keyword. Options work for the first pass but do not work when trying to search for long strings or clearing the string and retrying. The keyword does come through and Options are created based on the output but the options do not get reloaded on the drop down UI although the options are logged and created on each request.

DEBUG:bolt_app:Responding with status: 200 body: "{"options": [{"text": {"type": "plain_text", "text": "Rocky Mountain National Park, Colorado, USA"}, "value": "Rocky Mountain National Park, Colorado, USA"}, {"text": {"type": "plain_text", "text": "Rocky Mountain Metropolitan Airport (Terminal), Airport Way, Broomfield, CO, USA"}, "value": "Rocky Mountain Metropolitan Airport (Terminal), Airport Way, Broomfield, CO, USA"}, {"text": {"type": "plain_text", "text": "Rocky Mountain Arsenal National Wildlife Refuge, Gateway Rd, Commerce City, CO, USA"}, "value": "Rocky Mountain Arsenal National Wildlife Refuge, Gateway Rd, Commerce City, CO, USA"}, {"text": {"type": "plain_text", "text": "Rocky Mount, NC, USA"}, "value": "Rocky Mount, NC, USA"}, {"text": {"type": "plain_text", "text": "Rocky Mountains"}, "value": "Rocky Mountains"}]}"

Screenshot 2023-02-20 at 9 16 10 AM

Requirements

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions