mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-26 07:59:48 +03:00
Fix
This commit is contained in:
parent
3a8f588514
commit
93a13be072
|
@ -1,10 +1,4 @@
|
||||||
import React, {
|
import React, { cloneElement, Children, Component } from 'react';
|
||||||
cloneElement,
|
|
||||||
Children,
|
|
||||||
Component,
|
|
||||||
ReactNode,
|
|
||||||
ReactElement,
|
|
||||||
} from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Dock from 'react-dock';
|
import Dock from 'react-dock';
|
||||||
import { Action, Dispatch } from 'redux';
|
import { Action, Dispatch } from 'redux';
|
||||||
|
@ -42,8 +36,8 @@ export interface DockMonitorProps<S, A extends Action<unknown>>
|
||||||
dispatch: Dispatch<DockMonitorAction>;
|
dispatch: Dispatch<DockMonitorAction>;
|
||||||
|
|
||||||
children:
|
children:
|
||||||
| Monitor<S, A, unknown, unknown, Action<unknown>>
|
| Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>
|
||||||
| Monitor<S, A, unknown, unknown, Action<unknown>>[];
|
| Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class DockMonitor<
|
export default class DockMonitor<
|
||||||
|
@ -163,7 +157,7 @@ export default class DockMonitor<
|
||||||
};
|
};
|
||||||
|
|
||||||
renderChild(
|
renderChild(
|
||||||
child: ReactElement,
|
child: Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<unknown>>,
|
||||||
index: number,
|
index: number,
|
||||||
otherProps: Omit<
|
otherProps: Omit<
|
||||||
DockMonitorProps<S, A>,
|
DockMonitorProps<S, A>,
|
||||||
|
@ -196,8 +190,23 @@ export default class DockMonitor<
|
||||||
onSizeChange={this.handleSizeChange}
|
onSizeChange={this.handleSizeChange}
|
||||||
dimMode="none"
|
dimMode="none"
|
||||||
>
|
>
|
||||||
{Children.map<ReactNode, ReactElement>(children, (child, index) =>
|
{Children.map(
|
||||||
this.renderChild(child, index, rest)
|
children as
|
||||||
|
| Monitor<
|
||||||
|
S,
|
||||||
|
A,
|
||||||
|
LiftedState<S, A, unknown>,
|
||||||
|
unknown,
|
||||||
|
Action<unknown>
|
||||||
|
>
|
||||||
|
| Monitor<
|
||||||
|
S,
|
||||||
|
A,
|
||||||
|
LiftedState<S, A, unknown>,
|
||||||
|
unknown,
|
||||||
|
Action<unknown>
|
||||||
|
>[],
|
||||||
|
(child, index) => this.renderChild(child, index, rest)
|
||||||
)}
|
)}
|
||||||
</Dock>
|
</Dock>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user