Skip to content

[Rendering] AdaptiveTableCell is incorrectly serialize to AdaptiveContainer #9139

@vascobueno

Description

@vascobueno

Target Platforms

Other

SDK Version

3.1.0

Application Name

MIcrosoft Teams

Problem Description

When serializing a TableCell to JSON the type of TableCell is sereialized to Container. The correct type needs to be TableCell.
Workaround: set Type of TableCell as "TableCell" and it works fine.
Example:
"type": "TableRow", "cells": [ { "type": "Container", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "Nome do Arquivo", "wrap": true } ] } ]

Screenshots

No response

Card JSON

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "size": "extraLarge",
            "weight": "bolder",
            "text": "Core Test"
          },
          {
            "type": "Table",
            "rows": [
              {
                "type": "TableRow",
                "cells": [
                  {
                    "type": "Container",
                    "items": [
                      {
                        "type": "TextBlock",
                        "weight": "bolder",
                        "text": "Filename",
                        "wrap": true
                      }
                    ]
                  },
                  {
                    "type": "Container",
                    "items": [
                      {
                        "type": "TextBlock",
                        "weight": "bolder",
                        "text": "Filetype",
                        "wrap": true
                      }
                    ]
                  }
                ]
              }
            ],
            "columns": [
              {
                "width": 1
              },
              {
                "width": 1
              }
            ],
            "firstRowAsHeaders": true,
            "verticalCellContentAlignment": "center"
          }
        ],
        "msteams": {
          "width": "Full"
        }
      }
    }
  ]
}

Sample Code Language

No response

Sample Code

No response

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