我有一个消息扩展,其中
Action command
之一显示了一种基本上是自适应卡片的表单。该卡包含一个下拉菜单。
我感兴趣的是有什么方法可以在列表上执行搜索。
请参阅下面的图片和代码以了解更多信息。
我正在发展
Node.js
const card = CardFactory.adaptiveCard({
version: '1.0.0',
type: 'AdaptiveCard',
body: [
{
"type": "TextBlock",
"text": "Route Name",
"size": "Medium",
"weight": "Bolder",
"spacing": "Large"
},
{
"type": "Input.ChoiceSet",
id: "routeId",
"spacing": "small",
"choices": routedDd,
"placeholder": "Select an option",
"value": "Select an option"
}
],
actions: [
{
type: 'Action.Submit',
title: 'Submit'
}
]
});
return {
task: {
type: 'continue',
value: {
card: card,
heigth: 200,
width: 400,
title: 'Add Task'
}
}
};
我认为这个功能还没有发布,但已经在路线图中了。请参阅 https://www.youtube.com/watch?v=SEsjrFIf110
您可以使用Input.ChoiceSet。这是一个例子:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.6",
"body": [
{
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Choice 1",
"value": "Choice_1"
},
{
"title": "Choice 2",
"value": "Choice_2"
},
{
"title": "Choice 3",
"value": "Choice_3"
}
],
"isMultiSelect": false,
"style": "filtered",
"id": "choiceSelect",
"placeholder": "Type anything to search.."
}
]
}