@centreon/ui 26.3.12 → 26.3.13
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/package.json
CHANGED
|
@@ -112,14 +112,35 @@ const MemoizedGroup = ({
|
|
|
112
112
|
);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
export default memo(
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
export default memo(MemoizedGroup, (prevProps, nextProps) => {
|
|
116
|
+
const prevBarValues = prevProps.barGroup.bars.map(({ key, value }) => {
|
|
117
|
+
if (key.startsWith('stacked-')) {
|
|
118
|
+
const timeValueBar =
|
|
119
|
+
prevProps.stackedLinesTimeSeriesPerStackKeyAndUnit[key].timeSeries[
|
|
120
|
+
prevProps.barIndex
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
return timeValueBar;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return value;
|
|
127
|
+
});
|
|
128
|
+
const nextBarValues = nextProps.barGroup.bars.map(({ key, value }) => {
|
|
129
|
+
if (key.startsWith('stacked-')) {
|
|
130
|
+
const timeValueBar =
|
|
131
|
+
nextProps.stackedLinesTimeSeriesPerStackKeyAndUnit[key].timeSeries[
|
|
132
|
+
nextProps.barIndex
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
return timeValueBar;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return value;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return (
|
|
118
142
|
equals(prevProps.barGroup, nextProps.barGroup) &&
|
|
119
|
-
equals(
|
|
120
|
-
prevProps.stackedLinesTimeSeriesPerStackKeyAndUnit,
|
|
121
|
-
nextProps.stackedLinesTimeSeriesPerStackKeyAndUnit
|
|
122
|
-
) &&
|
|
143
|
+
equals(prevBarValues, nextBarValues) &&
|
|
123
144
|
equals(prevProps.notStackedLines, nextProps.notStackedLines) &&
|
|
124
145
|
equals(prevProps.notStackedTimeSeries, nextProps.notStackedTimeSeries) &&
|
|
125
146
|
equals(prevProps.isHorizontal, nextProps.isHorizontal) &&
|
|
@@ -127,4 +148,5 @@ export default memo(
|
|
|
127
148
|
equals(prevProps.isTooltipHidden, nextProps.isTooltipHidden) &&
|
|
128
149
|
equals(prevProps.neutralValue, nextProps.neutralValue) &&
|
|
129
150
|
equals(prevProps.barIndex, nextProps.barIndex)
|
|
130
|
-
);
|
|
151
|
+
);
|
|
152
|
+
});
|