diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 8d611a68..e96fc858 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -320,30 +320,37 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {headerText} - {selectors.map((selector) => ( - handleCredentialChange(selector, e.target.value)} - style={{ marginBottom: '20px' }} - InputProps={{ - // Only show visibility toggle for password fields - endAdornment: defaultType === 'password' ? ( - - handleClickShowPassword(selector)} - edge="end" - > - {showPasswords[selector] ? : } - - - ) : undefined, - }} - /> - ))} + {selectors.map((selector) => { + const isVisible = showPasswords[selector]; + + return ( + handleCredentialChange(selector, e.target.value)} + style={{ marginBottom: '20px' }} + InputProps={{ + // Now showing visibility toggle for all fields + endAdornment: ( + + handleClickShowPassword(selector)} + edge="end" + // Optional: disable if field is empty + disabled={!credentials[selector]?.value} + > + {isVisible ? : } + + + ), + }} + /> + ); + })} ); };