mirror of
https://github.com/maputnik/editor.git
synced 2025-12-26 08:00:01 +00:00
'id' is not guaranteed to be unique, see <https://github.com/maputnik/editor/pull/610/files#r372521304>
This commit is contained in:
@@ -22,8 +22,7 @@ function renderProperties(feature) {
|
||||
}
|
||||
|
||||
function renderFeature(feature, idx) {
|
||||
const uniqueKey = feature.hasOwnProperty('id') ? feature.id : idx;
|
||||
return <div key={`${feature.sourceLayer}-${uniqueKey}`}>
|
||||
return <div key={`${feature.sourceLayer}-${idx}`}>
|
||||
<div className="maputnik-popup-layer-id">{feature.layer['source-layer']}{feature.inspectModeCounter && <span> × {feature.inspectModeCounter}</span>}</div>
|
||||
<InputBlock key={"property-type"} label={"$type"}>
|
||||
<StringInput value={feature.geometry.type} style={{backgroundColor: 'transparent'}} />
|
||||
|
||||
Reference in New Issue
Block a user