mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
chart-monitor
This commit is contained in:
parent
9321b91552
commit
c9dbfcef54
|
@ -27,14 +27,14 @@ export interface Props<S, A extends Action<string>>
|
||||||
|
|
||||||
class Chart<S, A extends Action<string>> extends Component<Props<S, A>> {
|
class Chart<S, A extends Action<string>> extends Component<Props<S, A>> {
|
||||||
divRef = createRef<HTMLDivElement>();
|
divRef = createRef<HTMLDivElement>();
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
renderChart?: (state?: {} | null | undefined) => void;
|
renderChart?: (state?: {} | null | undefined) => void;
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { select, state, defaultIsVisible } = this.props;
|
const { select, state, defaultIsVisible } = this.props;
|
||||||
this.renderChart = tree(this.divRef.current!, this.props);
|
this.renderChart = tree(this.divRef.current!, this.props);
|
||||||
if (defaultIsVisible) {
|
if (defaultIsVisible) {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
this.renderChart(select(state!) as {} | null | undefined);
|
this.renderChart(select(state!) as {} | null | undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class Chart<S, A extends Action<string>> extends Component<Props<S, A>> {
|
||||||
const { state, select, monitorState } = nextProps;
|
const { state, select, monitorState } = nextProps;
|
||||||
|
|
||||||
if (monitorState.isVisible !== false) {
|
if (monitorState.isVisible !== false) {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
this.renderChart!(select(state!) as {} | null | undefined);
|
this.renderChart!(select(state!) as {} | null | undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user