Skip to content

List widget populates default/empty entry by default #2380

@madikarizma

Description

@madikarizma

Describe the bug
List widget populates default/empty entry by default

To Reproduce
Use configuration below / see screenshot

Expected behavior
When considering UX for a content editor, especially when a list field is configured to be not required, forcing the user to remove the default list entry is an unnecessary step. It is better behavior for a user to add list items when they want them vs. removing the default/empty list item when they don't want them. This is also a more educational experience for a user who may be getting acquainted with Netlify CMS. The empty gray block you see by default is not intuitive and could confuse the user. In my opinion, fields should not be populated with a default value unless it is configured to have a default value.

Screenshots
Screen Shot 2019-06-12 at 2 58 06 PM

Applicable Versions:

  • Netlify CMS version: 2.9.0 via unpkg
  • Git provider: GitHub
  • OS: Mac OS 10.14.5 Mojave
  • Browser version: Chrome 74.0.3729.169
  • Node.JS version: v12.1.0

CMS configuration

fields:
- label: List
  name: list
  widget: list
  required: false
  fields:
  - label: Test
    name: test
    widget: text

Metadata

Metadata

Assignees

No one assigned

    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