|
@@ -21,21 +21,21 @@ function wrapContainer(containerKey, OriginalContainer) {
|
21
|
21
|
if (!props.screenId) {
|
22
|
22
|
throw new Error(`Screen ${containerKey} does not have a screenId!`);
|
23
|
23
|
}
|
24
|
|
- this.screenId = props.screenId;
|
25
|
24
|
this.state = {
|
26
|
|
- allProps: {...props, ...PropsStore.getPropsForScreenId(this.screenId)}
|
|
25
|
+ screenId: props.screenId,
|
|
26
|
+ allProps: {...props, ...PropsStore.getPropsForScreenId(props.screenId)}
|
27
|
27
|
};
|
28
|
28
|
}
|
29
|
29
|
|
30
|
30
|
componentWillReceiveProps(nextProps) {
|
31
|
31
|
this.setState({
|
32
|
|
- allProps: {...nextProps, ...PropsStore.getPropsForScreenId(this.screenId)}
|
|
32
|
+ allProps: {...nextProps, ...PropsStore.getPropsForScreenId(this.state.screenId)}
|
33
|
33
|
});
|
34
|
34
|
}
|
35
|
35
|
|
36
|
36
|
render() {
|
37
|
37
|
return (
|
38
|
|
- <OriginalContainer {...this.state.allProps} screenId={this.screenId}/>
|
|
38
|
+ <OriginalContainer {...this.state.allProps} screenId={this.state.screenId}/>
|
39
|
39
|
);
|
40
|
40
|
}
|
41
|
41
|
};
|