microsoft / microsoft/AdaptiveCards

Issue with dynamic typeahead search in adaptive cards

Open
#8,861 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Schema Bug
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Target Application

Microsoft Teams

Application Operating System

Windows

Schema Version

1.5

Problem Description

There is an issue with dynamic typeahead search in adaptive cards for Teams. We get validation errors when we search any data from the dataset.

Example :

ptry1

In this example, the validation property I have used is isRequired. So, when I set this property to true, select data from dropdown and click on Submit it gives me validation error.

Expected Outcome

It should not give validation error when data is selected from dropdown. Below is the expected outcome:

ptry2
Actual Outcome

It is giving validation error when data is selected from dropdown.

ptry1
Card JSON
{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.3",
  "body": [
    {
      "type": "ColumnSet",
      "columns": [
        {
          "width": "stretch",
          "items": [
            {
              "choices": [],
              "choices.data": {
                "type": "Data.Query",
                "dataset": "city",
                "top": 20
              },
              "errorMessage": "City is required",
              "id": "city",
              "isMultiSelect": false,
              "isRequired": true,
              "label": "City",
              "style": "filtered",
              "type": "Input.ChoiceSet",
              "value": ""
            }
          ],
          "type": "Column"
        }
      ]
    },
    {
      "type": "ActionSet",
      "actions": [
        {
          "type": "Action.Submit",
          "title": "Submit"
        }
      ]
    }
  ]
}
Repro Steps

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided Adaptive Card JSON in Microsoft Teams on Windows with schema version 1.5, using the dynamic typeahead dataset and required field validation. Trace why selecting a dropdown result still triggers the "City is required" error; done means the selected city submits without a validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.