cr-ui-lib 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -903,7 +903,7 @@ var MultiLineGraph = ({
|
|
|
903
903
|
chart_js.Legend
|
|
904
904
|
);
|
|
905
905
|
const chartRef = React.useRef(null);
|
|
906
|
-
const [chartKey, setChartKey] = React.useState(
|
|
906
|
+
const [chartKey, setChartKey] = React.useState(0);
|
|
907
907
|
const defaultColors = [
|
|
908
908
|
{ line: "#17CA43", point: "#17CA43" },
|
|
909
909
|
{ line: "#FF6B6B", point: "#FF4757" },
|
|
@@ -914,7 +914,7 @@ var MultiLineGraph = ({
|
|
|
914
914
|
];
|
|
915
915
|
React.useEffect(() => {
|
|
916
916
|
const handleResize = () => {
|
|
917
|
-
setChartKey(
|
|
917
|
+
setChartKey((prevKey) => prevKey + 1);
|
|
918
918
|
};
|
|
919
919
|
window.addEventListener("resize", handleResize);
|
|
920
920
|
return () => {
|
|
@@ -1175,10 +1175,10 @@ var SingleLineGraph = ({
|
|
|
1175
1175
|
chart_js.Legend
|
|
1176
1176
|
);
|
|
1177
1177
|
const chartRef = React.useRef(null);
|
|
1178
|
-
const [chartKey, setChartKey] = React.useState(
|
|
1178
|
+
const [chartKey, setChartKey] = React.useState(0);
|
|
1179
1179
|
React.useEffect(() => {
|
|
1180
1180
|
const handleResize = () => {
|
|
1181
|
-
setChartKey(
|
|
1181
|
+
setChartKey((prevKey) => prevKey + 1);
|
|
1182
1182
|
};
|
|
1183
1183
|
window.addEventListener("resize", handleResize);
|
|
1184
1184
|
return () => {
|