fix persistedPluginState
Summary: The persistedState of the Layout (and potentially other plugins) wasn't updated. It turned out that the updated state value never got passed to `setPluginState`, but accidentally when adding a type declaration, the `Object` constructor was passed as value to the state. Reviewed By: jknoxville, passy Differential Revision: D17282822 fbshipit-source-id: 6fc64960ee2405ea5a705504969c36a27ac62f2c
This commit is contained in:
committed by
Facebook Github Bot
parent
80f26eaa82
commit
e9aaf5d445
@@ -62,7 +62,7 @@ type DispatchFromProps = {
|
|||||||
selectedApp?: string | null;
|
selectedApp?: string | null;
|
||||||
deepLinkPayload: string | null;
|
deepLinkPayload: string | null;
|
||||||
}) => any;
|
}) => any;
|
||||||
setPluginState: (payload: {pluginKey: string; state: Object}) => void;
|
setPluginState: (payload: {pluginKey: string; state: any}) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
type Props = StateFromProps & DispatchFromProps & OwnProps;
|
type Props = StateFromProps & DispatchFromProps & OwnProps;
|
||||||
@@ -133,7 +133,7 @@ class PluginContainer extends PureComponent<Props> {
|
|||||||
...pluginState,
|
...pluginState,
|
||||||
}
|
}
|
||||||
: pluginState,
|
: pluginState,
|
||||||
setPersistedState: _state => setPluginState({pluginKey, state: Object}),
|
setPersistedState: state => setPluginState({pluginKey, state}),
|
||||||
target,
|
target,
|
||||||
deepLinkPayload: this.props.deepLinkPayload,
|
deepLinkPayload: this.props.deepLinkPayload,
|
||||||
selectPlugin: (pluginID: string, deepLinkPayload: string | null) => {
|
selectPlugin: (pluginID: string, deepLinkPayload: string | null) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user