e2corporation commented on code in PR #2002:
URL: https://github.com/apache/incubator-devlake/pull/2002#discussion_r882260551
##########
config-ui/src/pages/configure/connections/ConnectionForm.jsx:
##########
@@ -408,20 +413,30 @@ export default function ConnectionForm (props) {
? labels.username
: (
<>Username</>
- )}
+ )}
<span className='requiredStar'>*</span>
</Label>
<InputGroup
id='connection-username'
+ inputRef={connectionUsernameRef}
disabled={isTesting || isSaving || isLocked}
placeholder='Enter Username'
defaultValue={username}
onChange={(e) => onUsernameChange(e.target.value)}
- className={`input username-input ${fieldHasError('Username')
? 'invalid-field' : ''}`}
+ className={`input username-input ${stateErrored ===
'Username' ? 'invalid-field' : ''}`}
Review Comment:
where is $stateErrored defined? The `fieldHasError` function should be
defined somewhere if not clone it in scope. Alternatively the function was also
defined in one of the hooks and could be added to the destructured list (search
for `fieldHasError` for existing usage)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]