Skip to content

Unable to empty property value #424

@zaplvlad

Description

@zaplvlad

Property value cannot be cleaned up.

Steps to reproduce

  1. Configure "global" collection with localized property as following.
import { GlobalConfig } from 'payload/types';

export const globalCollection: GlobalConfig = {
  slug: 'globalCollection',
  label: 'Global Collection',
  fields: [
    {
      name: 'someProperty',
      type: 'text',
      localized: true,
    },
  ],
};
  1. Configure two locales for CMS.

locales: ['en', 'da-DK']

  1. Go to CMS and fill up this property with some data for any locale.
  2. Save document.

1

  1. Reload page to make sure property value was saved.
  2. Cleanup property value.
  3. Save document.

2

  1. Reload page again.

Current Behavior

You will see that property data wasn't removed and still saved. It is possible to change value but not cleanup. The same behavior present in other property types, not only for "text".

Expected result

It should be possible to empty property data.

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