Show key value in builder textArea for map type template vals
parent
3c554095b7
commit
f6b4e1cf48
|
@ -24,9 +24,13 @@ class MapTemplateBuilder extends PureComponent<TemplateBuilderProps, State> {
|
||||||
public constructor(props: TemplateBuilderProps) {
|
public constructor(props: TemplateBuilderProps) {
|
||||||
super(props)
|
super(props)
|
||||||
const templateValues = props.template.values.map(v => v.value)
|
const templateValues = props.template.values.map(v => v.value)
|
||||||
|
const templateKeys = props.template.values.map(v => v.key)
|
||||||
|
const templateValuesString = templateKeys
|
||||||
|
.map((v, i) => `${v}, ${templateValues[i]}`)
|
||||||
|
.join('\n')
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
templateValuesString: templateValues.join(', '),
|
templateValuesString,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue