File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,17 @@ const Sidebar = ({
194
194
value = { key }
195
195
onChange = { ( e ) => {
196
196
const newKey = e . target . value ;
197
- const newEnv = { ...env } ;
198
- delete newEnv [ key ] ;
199
- newEnv [ newKey ] = value ;
197
+ const newEnv = Object . entries ( env ) . reduce (
198
+ ( acc , [ k , v ] ) => {
199
+ if ( k === key ) {
200
+ acc [ newKey ] = value ;
201
+ } else {
202
+ acc [ k ] = v ;
203
+ }
204
+ return acc ;
205
+ } ,
206
+ { } as Record < string , string > ,
207
+ ) ;
200
208
setEnv ( newEnv ) ;
201
209
setShownEnvVars ( ( prev ) => {
202
210
const next = new Set ( prev ) ;
Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ const ToolsTab = ({
233
233
id = { key }
234
234
name = { key }
235
235
placeholder = { prop . description }
236
+ value = { ( params [ key ] as string ) ?? "" }
236
237
onChange = { ( e ) =>
237
238
setParams ( {
238
239
...params ,
You can’t perform that action at this time.
0 commit comments