File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/webviews/webview-side/integrations Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ export const RedshiftForm: React.FC<IRedshiftFormProps> = ({
4444 ? structuredClone ( existingConfig )
4545 : createEmptyRedshiftConfig ( { id : integrationId , name : defaultName } )
4646 ) ;
47+ // Store credentials temporarily when switching to individual-credentials
48+ const [ savedCredentials , setSavedCredentials ] = React . useState < { user : string ; password : string } > ( {
49+ user : '' ,
50+ password : ''
51+ } ) ;
4752
4853 React . useEffect ( ( ) => {
4954 setPendingConfig (
@@ -67,11 +72,18 @@ export const RedshiftForm: React.FC<IRedshiftFormProps> = ({
6772 host : prev . metadata . host ,
6873 port : prev . metadata . port ,
6974 database : prev . metadata . database ,
70- user : '' ,
71- password : ''
75+ user : savedCredentials . user ,
76+ password : savedCredentials . password
7277 }
7378 } ) ) ;
7479 } else {
80+ // Save current credentials before switching
81+ if ( pendingConfig . metadata . authMethod === 'username-and-password' ) {
82+ setSavedCredentials ( {
83+ user : pendingConfig . metadata . user ,
84+ password : pendingConfig . metadata . password
85+ } ) ;
86+ }
7587 setPendingConfig ( ( prev ) => ( {
7688 ...prev ,
7789 metadata : {
You can’t perform that action at this time.
0 commit comments