简体   繁体   中英

Can we Set "isVisible":false for buttons(Action.Submit) in adaptive card designer to render card in Teams mobile

I have "isVisible":false property set for buttons(Action.Submit) in Adaptive cardbut it is not working correctly in Teams mobile app but working correctly in Teams DeskTop app.

I dont want to use Action.ToggleVisibility property as it is not my requirement. I only want to use Action.Submit buttons and want to set initially invisible properties for it. I am using "isVisible":false property set for the buttons but it is working correctly in Teams windows desktop but the same json i am using to render it in Teams mobile app but it is not working as expected.

Is it something like we cannot use isVisible:false property directly for buttons (Action.Submit). I am facing problem as it working fine in desktop but not in Teams mobile.

Please find attachment for your reference. Screenshot of adaptive card designer:

自适应卡片设计器的屏幕截图

Please tell me the solution so that it works the same in Teams Mobile app as it is working in Teams desktop. Screenshot of how it is appearing in Teams windows desktop:

它在 Teams Windows 桌面中的显示方式的屏幕截图

Screenshot of how it is appearing in Teams Mobile App:

它在 Teams 移动应用程序中的显示方式的屏幕截图

Please find the way of how i am declaring the property:

{
  "type": "ActionSet",
  "columns": null,
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Yes",
      "id": "attachment"
    },
    {
      "type": "Action.Submit",
      "title": "No",
      "id": "NoAttachment"
    }
  ],
  "text": null,
  "color": null,
  "wrap": false,
  "isVisible": false,
  "id": null
}

Can you perhaps explain why you want to have items on the card, that are not visible at all?

As an option though, have a look at the "ShowCard" action , which lets one button open/close another section on the card.

[Update based on comments below] As per the comments, it seems like it might make sense to simply create a more simple card in some scenarios, versus a more complex card in others. As a result, you can have a look at this question where some approaches to creating a card are discussed: Display number in adaptive card

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM