mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 20:01:10 +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:
@@ -68,7 +68,7 @@ class SysAdminLibHistorySettingDialog extends React.Component {
|
||||
}
|
||||
};
|
||||
|
||||
handleKeyPress = (e) => {
|
||||
handleKeyDown = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
this.submit();
|
||||
e.preventDefault();
|
||||
@@ -132,7 +132,7 @@ class SysAdminLibHistorySettingDialog extends React.Component {
|
||||
value={this.state.expireDays}
|
||||
onChange={this.onChange}
|
||||
disabled={this.state.disabled}
|
||||
onKeyDown={this.handleKeyPress}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
/>{' '}
|
||||
<Label><span>{gettext('days')}</span></Label>
|
||||
</FormGroup>
|
||||
|
Reference in New Issue
Block a user