passing params asis

master
Malar Kannan 2017-07-31 18:06:01 +05:30
parent 7d759f96b2
commit 193cccdfa4
1 changed files with 4 additions and 8 deletions

View File

@ -130,19 +130,15 @@ function propListInput(params: any) {
let { field, changed } = params;
return (
<LexInputContainer key={field} label={changedLabel(changed, field)}>
<PropListInput params={params} />
<PropListInput {...params} />
</LexInputContainer>
);
}
class PropListInput extends React.Component<any, any> {
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<any>(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<any, any> {
}
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}`,