Ensure iterators have keys (uprns in building view)
This commit is contained in:
parent
6737c87803
commit
024d29ca2c
@ -34,6 +34,7 @@ const BuildingView = (props) => {
|
|||||||
section_props.fields.map(field_props => {
|
section_props.fields.map(field_props => {
|
||||||
return (field_props.slug === 'uprns')?
|
return (field_props.slug === 'uprns')?
|
||||||
<UPRNsDataEntry
|
<UPRNsDataEntry
|
||||||
|
key={field_props.slug}
|
||||||
title={field_props.title}
|
title={field_props.title}
|
||||||
value={props.uprns}
|
value={props.uprns}
|
||||||
tooltip={field_props.tooltip} />
|
tooltip={field_props.tooltip} />
|
||||||
@ -122,7 +123,7 @@ const UPRNsDataEntry = (props) => {
|
|||||||
<Fragment>{
|
<Fragment>{
|
||||||
no_parent.length?
|
no_parent.length?
|
||||||
no_parent.map(uprn => (
|
no_parent.map(uprn => (
|
||||||
<li>{uprn.uprn}</li>
|
<li key={uprn.uprn}>{uprn.uprn}</li>
|
||||||
))
|
))
|
||||||
: '\u00A0'
|
: '\u00A0'
|
||||||
}</Fragment>
|
}</Fragment>
|
||||||
@ -132,7 +133,7 @@ const UPRNsDataEntry = (props) => {
|
|||||||
<summary>Children</summary>
|
<summary>Children</summary>
|
||||||
{
|
{
|
||||||
with_parent.map(uprn => (
|
with_parent.map(uprn => (
|
||||||
<li>{uprn.uprn} (child of {uprn.parent_uprn})</li>
|
<li key={uprn.uprn}>{uprn.uprn} (child of {uprn.parent_uprn})</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</details>
|
</details>
|
||||||
|
Loading…
Reference in New Issue
Block a user