mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
Improved comment
This commit is contained in:
parent
58ee123cef
commit
382d7b1c9f
1 changed files with 1 additions and 1 deletions
|
@ -150,6 +150,7 @@ const DefaultChart = memo((
|
||||||
const chartData = generateChartData(isBarChart, labels, data, highlightedData, highlightedLabel);
|
const chartData = generateChartData(isBarChart, labels, data, highlightedData, highlightedLabel);
|
||||||
const height = determineHeight(isBarChart, labels);
|
const height = determineHeight(isBarChart, labels);
|
||||||
|
|
||||||
|
// Provide a key based on the height, to force re-render every time the dataset changes (example, due to pagination)
|
||||||
const renderChartComponent = (customKey: string) => (
|
const renderChartComponent = (customKey: string) => (
|
||||||
<Component
|
<Component
|
||||||
ref={(element) => {
|
ref={(element) => {
|
||||||
|
@ -163,7 +164,6 @@ const DefaultChart = memo((
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
// Provide a key based on the height, so that every time the dataset changes, a new chart is rendered
|
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className={classNames('col-sm-12', { 'col-md-7': !isBarChart })}>
|
<div className={classNames('col-sm-12', { 'col-md-7': !isBarChart })}>
|
||||||
|
|
Loading…
Reference in a new issue