Define keys
This commit is contained in:
parent
10e9f16b75
commit
84031dc3ef
|
@ -66,6 +66,7 @@ export default class JSONNode extends Component {
|
||||||
if (data.props.length > 0) {
|
if (data.props.length > 0) {
|
||||||
const props = data.props.map(prop => {
|
const props = data.props.map(prop => {
|
||||||
return h(JSONNode, {
|
return h(JSONNode, {
|
||||||
|
key: prop.name,
|
||||||
parent: this,
|
parent: this,
|
||||||
prop: prop.name,
|
prop: prop.name,
|
||||||
data: prop.value,
|
data: prop.value,
|
||||||
|
@ -101,6 +102,7 @@ export default class JSONNode extends Component {
|
||||||
if (data.items.length > 0) {
|
if (data.items.length > 0) {
|
||||||
const items = data.items.map((child, index) => {
|
const items = data.items.map((child, index) => {
|
||||||
return h(JSONNode, {
|
return h(JSONNode, {
|
||||||
|
key: index,
|
||||||
parent: this,
|
parent: this,
|
||||||
prop: index,
|
prop: index,
|
||||||
data: child,
|
data: child,
|
||||||
|
|
Loading…
Reference in New Issue