diff --git a/packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx b/packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx index 22c098105ef..fb0316341e3 100644 --- a/packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx +++ b/packages/grafana-ui/src/components/VizLegend/VizLegendSeriesIcon.tsx @@ -8,29 +8,25 @@ interface Props { onColorChange: (color: string) => void; } -export const VizLegendSeriesIcon = React.memo( - ({ disabled, color, onColorChange }) => { - return disabled ? ( - - ) : ( - - {({ ref, showColorPicker, hideColorPicker }) => ( - - )} - - ); - }, - // 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; - } -); +/** + * @internal + */ +export const VizLegendSeriesIcon: React.FunctionComponent = ({ disabled, color, onColorChange }) => { + return disabled ? ( + + ) : ( + + {({ ref, showColorPicker, hideColorPicker }) => ( + + )} + + ); +}; VizLegendSeriesIcon.displayName = 'VizLegendSeriesIcon';