@@ -164,7 +164,7 @@ export const CopyField = (
164164
165165 { props . showTokField && (
166166 < LinkBox
167- style = { { position : 'absolute' , right : '10px' , top : '30px ' } }
167+ style = { { position : 'absolute' , right : '10px' , top : '40px ' } }
168168 onClick = { handleClick }
169169 >
170170 < icons . copy color = { iconColors . grey } />
@@ -210,6 +210,10 @@ export const EditField = (
210210 InputComponent = {
211211 < TextInput
212212 { ...props }
213+ style = { {
214+ backgroundColor : props . disabled && '#E9EAEC' ,
215+ borderWidth : props . disabled && '0px' ,
216+ } }
213217 defaultValue = { props ?. defaultValue }
214218 value = { props . value }
215219 placeholder = { props . placeholder }
@@ -218,7 +222,7 @@ export const EditField = (
218222 />
219223 { ! props . disabled && (
220224 < Box style = { { position : 'absolute' , right : '10px' , top : '35px' } } >
221- < icons . pen color = { iconColors . grey } />
225+ < icons . pen color = { iconColors . black } />
222226 </ Box >
223227 ) }
224228 </ FlexBox >
@@ -248,6 +252,7 @@ export const EditFieldSettings = (
248252 return (
249253 < FlexBox . Column fullWidth >
250254 < FlexBox alignItems = "center" fullWidth style = { { position : 'relative' } } >
255+ { console . log ( disabled , 'disableddisabled' ) }
251256 < InputWithLabel
252257 name = { props . name }
253258 label = { props . label }
@@ -258,23 +263,26 @@ export const EditFieldSettings = (
258263 { ...props }
259264 inputRef = { inputRef }
260265 defaultValue = { props ?. defaultValue }
261- value = { props . value }
266+ value = { disabled ? props ?. defaultValue : props . value }
262267 placeholder = { props . placeholder }
263268 disabled = { disabled }
264269 autoFocus = { ! disabled }
265- onRemoveFocus = { ( ) => setDisabled ( ! disabled ) }
266- // onFocus={(e: any) => e.currentTarget.select()}
270+ onRemoveFocus = { ( e : any ) => {
271+ setTimeout ( ( ) => {
272+ if ( disabled === false ) setDisabled ( true ) ;
273+ } , 200 ) ;
274+ } }
267275 />
268276 }
269277 />
278+ { /* {console.log(props?.defaultValue , props.value , 'disableddisabled')} */ }
270279 { ! props . disabled && (
271280 < Box
272281 onClick = { ( ) => {
273282 setDisabled ( ! disabled ) ;
274-
275- setTimeout ( ( ) => {
276- props . inputRef ?. current ?. focus ( ) ;
277- } , 10 ) ;
283+ // setTimeout(() => {
284+ // props.inputRef?.current?.focus();
285+ // }, 1000);
278286 } }
279287 style = { {
280288 position : 'absolute' ,
@@ -283,8 +291,7 @@ export const EditFieldSettings = (
283291 cursor : 'pointer' ,
284292 } }
285293 >
286- { console . log ( disabled , 'disableddisabled' ) }
287- < icons . pen color = { iconColors . grey } />
294+ < icons . pen color = { disabled ? iconColors . black : iconColors . grey } />
288295 </ Box >
289296 ) }
290297 </ FlexBox >
0 commit comments