decaporg / decaporg/decap-cms

Map widget doesn't show map inside list widget

Open
#4,385 5 comments 1 reaction 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
Map widget doesn't load map inside a list widget whenever there is already a value entered.

**To Reproduce**
1. Create `list` widget containing a `map` widget
2. Define a point on a map and publish page
3. Load up published page, open widget

**Expected behavior**
Map widget loads map

**Screenshots**

image

**Applicable Versions:**

- Netlify CMS version: [e.g. 2.0.4]
- Git provider: GitHub
- OS: MacOS Mojave, MacOS Bigsur
- Browser versions: Chrome 83, FF 81
**CMS configuration**
```js
const Gallery = {
label :'Gallery',
name :'gallery',
folder :'data/gallery',
create :true,
slug :'{{slug}}',
description :'Collection of image galleries',
fields: [
{
label :'Title',
name :'title',
widget :'string',
},
{
label :'Gallery',
name :'gallery',
widget :'list',
label_singular :'item',
fields: [
{
label :'Coordinates',
name :'cordinates',
widget :'map'
},
{
label :'Image',
name :'image',
widget :'file',
allow_multiple :false,
},
{
label :'Caption',
name :'caption',
widget :'string',
required :false,
}
]
}
]
}
```

**Additional context**
The maps seems to render when the list widget is set to `collapsed: false`. However if list items moved around in closed state maps are failed to render.

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.