From 193cccdfa4e8d61614abfae06e7f9790b0059ea0 Mon Sep 17 00:00:00 2001 From: Malar Kannan Date: Mon, 31 Jul 2017 18:06:01 +0530 Subject: [PATCH] passing params asis --- src/LexInputContainer.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/LexInputContainer.tsx b/src/LexInputContainer.tsx index 69b2077..8468e11 100644 --- a/src/LexInputContainer.tsx +++ b/src/LexInputContainer.tsx @@ -130,19 +130,15 @@ function propListInput(params: any) { let { field, changed } = params; return ( - + ); } class PropListInput extends React.Component { - constructor(props: any) { - super(props); - this.state = { modalOpen: false, exKey: '', exVal: '' }; - } - + state = { modalOpen: false, exKey: '', exVal: '' }; dropOptsForVal(value: any) { - let { field, langSelOpts } = this.props.params; + let { field, langSelOpts } = this.props; let fieldOpts = _.get(langSelOpts, field, []); function valueForKey(key: string) { let match = _.find(value, (v: any) => _.isEqual(v.key, key)); @@ -162,7 +158,7 @@ class PropListInput extends React.Component { } public render() { - let { sh, value } = this.props.params; + let { sh, value } = this.props; let dropOptions = this.dropOptsForVal(value); let renderLabel = (label: any) => ({ content: `${label.value.key}-${label.value.value}`,