mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-13 19:13:43 +00:00
Load more data when navigating in WikiTree
This commit is contained in:
@@ -164,6 +164,8 @@ export class Chart extends React.PureComponent<ChartProps, {}> {
|
||||
updateSvgSize: false,
|
||||
locale: this.context.intl.locale,
|
||||
});
|
||||
} else {
|
||||
this.chart!.setData(this.props.data);
|
||||
}
|
||||
const chartInfo = this.chart!.render({
|
||||
startIndi: this.props.selection.id,
|
||||
@@ -227,9 +229,7 @@ export class Chart extends React.PureComponent<ChartProps, {}> {
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: ChartProps) {
|
||||
const initialRender =
|
||||
this.props.data !== prevProps.data ||
|
||||
this.props.chartType !== prevProps.chartType;
|
||||
const initialRender = this.props.chartType !== prevProps.chartType;
|
||||
this.renderChart({initialRender});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user