mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
This reverts commit af46bbf654
.
This commit is contained in:
parent
bf83fb80b7
commit
d76c056656
@ -8,8 +8,10 @@ interface Props {
|
||||
onColorChange: (color: string) => void;
|
||||
}
|
||||
|
||||
export const VizLegendSeriesIcon = React.memo<Props>(
|
||||
({ disabled, color, onColorChange }) => {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const VizLegendSeriesIcon: React.FunctionComponent<Props> = ({ disabled, color, onColorChange }) => {
|
||||
return disabled ? (
|
||||
<SeriesIcon color={color} />
|
||||
) : (
|
||||
@ -25,12 +27,6 @@ export const VizLegendSeriesIcon = React.memo<Props>(
|
||||
)}
|
||||
</SeriesColorPicker>
|
||||
);
|
||||
},
|
||||
// areEqual -- return true if they are the same.
|
||||
// onColorChange updates frequently, so ignore that
|
||||
(prevProps, nextProps) => {
|
||||
return prevProps.color === nextProps.color && prevProps.disabled === nextProps.disabled;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
VizLegendSeriesIcon.displayName = 'VizLegendSeriesIcon';
|
||||
|
Loading…
Reference in New Issue
Block a user