Skip to content

Commit

Permalink
Merge pull request #1622 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1614-to-release-4.17

[release-4.17] Bug 2312442: Reset radio button when Provider mode is selected from dropdown
  • Loading branch information
openshift-merge-bot[bot] authored Oct 8, 2024
2 parents 0e3d6b2 + 8288daa commit abb3f2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export const BackingStorage: React.FC<BackingStorageProps> = ({
},
});
}
}, [dispatch, allowedExternalStorage.length, hasOCS]);
}, [dispatch, allowedExternalStorage.length, hasOCS, isProviderModePresent]);

React.useEffect(() => {
/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { FDF_FLAG } from '@odf/core/redux';
import { DeploymentType } from '@odf/core/types';
import { BackingStorageType, DeploymentType } from '@odf/core/types';
import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook';
import { useFlag } from '@openshift-console/dynamic-plugin-sdk';
import {
Expand Down Expand Up @@ -49,6 +49,12 @@ export const SelectDeployment: React.FC<SelectDeploymentProps> = ({
// 'value' on SelectProps['onSelect'] is string hence does not match with payload of type "DeploymentType"
payload: value as DeploymentType,
});
if (value === DeploymentType.PROVIDER_MODE) {
dispatch({
type: 'backingStorage/setType',
payload: BackingStorageType.EXISTING,
});
}
setIsSelectOpen(false);
};

Expand Down

0 comments on commit abb3f2b

Please sign in to comment.