Skip to content

[i18n] duplicate boolean field is not reactive #7086

@razonyang

Description

@razonyang

Describe the bug

I have a duplicate boolean field comments, when changing it in one locale, the field won't sync in other locales.

The problem is that the boolean widget does not update in real-time, while string and other widgets do. Once you save the page and refresh it, it will switch to the correct value.

To Reproduce
Have a boolean widget with i18n: duplicate, show 2 locales side-by-side, and toggle it. The widget on the other locale will not update.

Expected behavior
The toggle on the second locale should provide feedback in real time as the string widget does.

Screenshots

image

Applicable Versions:

  • Decap CMS version: 3.1.1

CMS configuration

Updated for clarity

local_backend: true
locale: en
media_folder: static/images/uploads
public_folder: /images/uploads
backend:
  name: git-gateway
collections:
- create: true
  folder: content/foo
  i18n: true
  label: Foo
  name: foo
  fields:
  - default: true
    hint: Whether to show comments.
    i18n: duplicate
    label: Comments
    name: comments
    required: false
    widget: boolean
  - i18n: duplicate
    label: Nav Weight
    name: nav_weight
    widget: number

Additional context

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