Skip to content

Issue: update from 8.2.0 to 8.3.0 breaks editing of arrays in data view #531

@Mai-Lapyst

Description

@Mai-Lapyst

Describe the bug
When defining a data type which has a array as member, the fields dont get loaded and stored correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project
  2. Initialize frontmatter
  3. Add following to frontmatter.json
    "frontMatter.data.types": [
      {
        "id": "bass_player",
        "schema": {
          "title": "Bass Player",
          "type": "object",
          "required": ["discography"],
          "properties": {
            "name": {
              "type": "string"
            },
            "discography": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    ],
    "frontMatter.data.folders": [
      {
        "id": "bass_players",
        "path": "[[workspace]]/data/jazz/bass",
        "type": "bass_player",
        "singleEntry": true
      }
    ]
  4. Add a data file: data/jazz/bass/jacopastorius.json:
    "name": "Jaco Pastorius",
    "discography": [
      "1974 - Modern American Music … Period! The Criteria Sessions",
      "2003 - Punk Jazz: The Jaco Pastorius Anthology (compilation)",
      "2007 - The Essential Jaco Pastorius (compilation)"
    ]
  5. Open the data view in front matter

Expected behavior
That arrays are editable in the data view.

Screenshots
Version 8.2.0:
image

Version 8.3.0:
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser VScode
  • Version 1.76.0

Additional context
Seems mostly due to this line being commented out:

// name: (child.props.name || '').replace('$', '' + itemIndex),

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions