Forum Discussion
Table control on iOS
Hi,
I am developing a digital assistant on MS Teams. One of the functionality required to present data in the table control. I designed application to show all fields on desktop application, but want to hide some of the fields on mobile devices because of screen size. In order to hide some columns I used targetWidth on table control. But it is not worked as I expected.
There's no problem with desktop or web browser client. The problem occurs on iPhone/iPad Teams client. As an example let's try to hide 3rd column. When I set targetWidth="wide", it only clear content of the column but the column is still present. Please find pseudo sample iOS screen below;
It is weird that I can see correct result when I check preview on https://adaptivecards.microsoft.com/designer
To solve this problem I assigned each object I want to hide from top to bottom but didn't work. Please find code snipped below;
{
"type": "AdaptiveCard",
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5",
"msteams": {
"width": "full"
},
"body": [
{
"type": "Table",
"columns": [
{
"width": 2
},
{
"width": 2
}
],
"rows": [
{
"type": "TableRow",
"cells": [
{
"type": "TableCell",
"items": [
{
"type": "TextBlock",
"text": "Host",
"wrap": true,
"weight": "Bolder",
"size": "Small",
"targetWidth": "Wide"
}
],
"targetWidth": "Wide"
},
{
"type": "TableCell",
"items": [
{
"type": "TextBlock",
"text": "Type",
"wrap": true,
"weight": "Bolder",
"size": "Small"
}
]
}
]
},
{
"type": "TableRow",
"cells": [
{
"type": "TableCell",
"items": [
{
"type": "TextBlock",
"text": "myhost",
"wrap": true,
"size": "Small",
"targetWidth": "Wide"
}
],
"targetWidth": "Wide"
},
{
"type": "TableCell",
"items": [
{
"type": "TextBlock",
"text": "Physical",
"wrap": true,
"size": "Small"
}
]
}
]
}
]
}
]
}
Thank you for your help,
Orkun Gedik
2 Replies
- Sayali-MSFT
Microsoft
Thank you for your patience! We were able to reproduce the issue in the [Mobile (iOS] Teams version [7.5.77.2025053203/0321]. We have reported this as a bug for further investigation.
We will keep you updated as soon as we receive further information. Thank you for bringing this to our attention!
- Sayali-MSFT
Microsoft
Hello orkungedik,
Thank you for your inquiry about your Teams app development issue!
We are checking the issue. We will get back to you shortly.