mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 03:47:09 +00:00
[keypress] replaced 'onKeyPress' with 'onKeyDown' as 'keypress' is de… (#5764)
* [keypress] replaced 'onKeyPress' with 'onKeyDown' as 'keypress' is deprecated * cleaned up code
This commit is contained in:
@@ -31,7 +31,7 @@ class SysAdminSetOrgNameDialog extends React.Component {
|
||||
});
|
||||
};
|
||||
|
||||
handleKeyPress = (e) => {
|
||||
handleKeyDown = (e) => {
|
||||
if (e.key == 'Enter') {
|
||||
this.handleSubmit();
|
||||
e.preventDefault();
|
||||
@@ -54,7 +54,7 @@ class SysAdminSetOrgNameDialog extends React.Component {
|
||||
<Input
|
||||
type="text"
|
||||
value={name}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
onChange={this.handleInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
Reference in New Issue
Block a user