Skip to content

Commit

Permalink
Merge pull request #1614 from bipuladh/fix-provider-mode
Browse files Browse the repository at this point in the history
Reset radio button when Provider mode is selected from dropdown
  • Loading branch information
openshift-merge-bot[bot] authored Oct 8, 2024
2 parents 79087f7 + c27a9c5 commit 6f69f2e
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 6f69f2e

Please sign in to comment.