mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 10:20:16 -06:00
SDA-4253 - Handle key down on pod input (#1928)
Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>
This commit is contained in:
parent
53b9e9a8ca
commit
28650d9c5d
@ -265,6 +265,18 @@ export default class AboutApp extends React.Component<{}, IState> {
|
||||
this.setState({ updatedHostname: value });
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles key down on input
|
||||
* @param e
|
||||
*/
|
||||
public onKeyDown = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
const { value } = e.target;
|
||||
this.setState({ updatedHostname: value });
|
||||
this.handlePodInputBlur(e);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Validates and sets new hostname
|
||||
*/
|
||||
@ -329,6 +341,7 @@ export default class AboutApp extends React.Component<{}, IState> {
|
||||
className={'AboutApp-pod-input'}
|
||||
type='text'
|
||||
value={updatedHostname}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onChange={this.handlePodChange}
|
||||
onBlur={this.handlePodInputBlur}
|
||||
autoFocus
|
||||
|
Loading…
Reference in New Issue
Block a user