feat: reset selected envrironment, service name, framework on data source step mount (#3992)

This commit is contained in:
Yunus M 2023-11-20 10:48:14 +05:30 committed by GitHub
parent 36aced6d1a
commit b3c0681a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,9 @@ export default function DataSource(): JSX.Element {
selectedFramework,
updateSelectedDataSource,
updateServiceName,
updateSelectedEnvironment,
updateSelectedFramework,
updateErrorDetails,
} = useOnboardingContext();
const [supportedDataSources, setSupportedDataSources] = useState<
@ -53,6 +55,11 @@ export default function DataSource(): JSX.Element {
setSupportedDataSources(dataSource);
}
updateSelectedEnvironment('');
updateErrorDetails('');
updateServiceName('');
updateSelectedFramework('');
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);