Skip to content

Commit

Permalink
Bug 1787210: deployment config page contains an error in the pod coun…
Browse files Browse the repository at this point in the history
…ter [openshift-4.4]
  • Loading branch information
dtaylor113 committed Feb 3, 2020
1 parent 63767c9 commit 7c4e5da
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/exhaustive-deps */
import * as React from 'react';
import * as _ from 'lodash';
import { Button, Split, SplitItem, Bullseye } from '@patternfly/react-core';
Expand Down Expand Up @@ -35,6 +36,13 @@ const PodRing: React.FC<PodRingProps> = ({
enableScaling,
impersonate,
);

React.useEffect(() => {
if (clickCount !== obj.spec.replicas) {
setClickCount(obj.spec.replicas);
}
}, [obj.spec.replicas]);

const handleScaling = _.debounce(
(operation: number) => {
const patch = [{ op: 'replace', path, value: operation }];
Expand Down

0 comments on commit 7c4e5da

Please sign in to comment.