decaporg / decaporg/decap-cms

[i18n] duplicate boolean field is not reactive

Open
#7,086 8 comments 0 reactions 0 assignees View on GitHub
area: extensions/widgets/boolean area: i18n type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**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](https://github.com/decaporg/decap-cms/assets/17720932/573d7ca9-6976-402c-bcee-19db503c9626)

**Applicable Versions:**

- Decap CMS version: 3.1.1

**CMS configuration**

*Updated for clarity*

```yaml
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**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.