This commit is contained in:
orangemug 2020-01-30 08:46:26 +00:00
parent 5b3d579f87
commit c714e23d79

View file

@ -22,8 +22,7 @@ function renderProperties(feature) {
} }
function renderFeature(feature, idx) { function renderFeature(feature, idx) {
const uniqueKey = feature.hasOwnProperty('id') ? feature.id : idx; return <div key={`${feature.sourceLayer}-${idx}`}>
return <div key={`${feature.sourceLayer}-${uniqueKey}`}>
<div className="maputnik-popup-layer-id">{feature.layer['source-layer']}{feature.inspectModeCounter && <span> × {feature.inspectModeCounter}</span>}</div> <div className="maputnik-popup-layer-id">{feature.layer['source-layer']}{feature.inspectModeCounter && <span> × {feature.inspectModeCounter}</span>}</div>
<InputBlock key={"property-type"} label={"$type"}> <InputBlock key={"property-type"} label={"$type"}>
<StringInput value={feature.geometry.type} style={{backgroundColor: 'transparent'}} /> <StringInput value={feature.geometry.type} style={{backgroundColor: 'transparent'}} />