Skip to content

TABLE_ITEM content inside ARRAY does not stretch to full width #349

@itwillwork

Description

@itwillwork

With the following configuration:

{
  "type": "object",
  "properties": {
    "context": {
      "properties": {
        "json": {
          "type": "STRING",
          "viewSpec": {
            "type": "textarea",
            "layout": "COLUMN",
            "layoutTitle": "JSON string"
          }
        },
        "messages": {
          "type": "ARRAY",
          "viewSpec": {
            "type": "base",
            "layout": "TRANSPARENT"
          },
          "items": {
            "properties": {
              "role": {
                "enum": [
                  "system",
                  "assistant",
                  "user"
                ],
                "description": {
                  "system": "System",
                  "assistant": "Assistant",
                  "user": "User"
                },
                "type": "STRING",
                "viewSpec": {
                  "type": "select",
                  "layout": "TABLE_ITEM",
                  "placeholder": "Role"
                }
              },
              "text": {
                "type": "STRING",
                "viewSpec": {
                  "type": "textarea",
                  "layout": "TABLE_ITEM",
                  "placeholder": "Text"
                }
              }
            },
            "type": "OBJECT",
            "viewSpec": {
              "order": [
                "role",
                "text"
              ],
              "type": "inline",
              "layout": "TRANSPARENT"
            }
          }
        }
      },
      "type": "OBJECT",
      "viewSpec": {
        "order": [
          "messages",
          "json"
        ],
        "type": "oneof_flat",
        "layout": "COLUMN",
        "layoutTitle": "Context"
      }
    }
  },
  "viewSpec": {
    "type": "base",
    "layout": "section",
    "layoutTitle": "Messages"
  }
}

When switching to "JSON string", the content occupies the full width. However, when switching to "messages" and adding a row, the content does not stretch to the full width.

Screenshot:

Image Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions