forked from p96170835/amis
空格弹出下拉框的时候,组织页面向下滚动
This commit is contained in:
parent
72f7925601
commit
334f3f8e03
|
@ -299,6 +299,7 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
|
|||
handleKeyPress(e: React.KeyboardEvent) {
|
||||
if (e.key === ' ') {
|
||||
this.handleClick();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -326,6 +326,7 @@ export class DateRangePicker extends React.Component<
|
|||
handleKeyPress(e: React.KeyboardEvent) {
|
||||
if (e.key === ' ') {
|
||||
this.handleClick();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -491,6 +491,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
|||
handleKeyPress(e: React.KeyboardEvent) {
|
||||
if (e.key === ' ') {
|
||||
this.toggle();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -272,6 +272,7 @@ export default class PickerControl extends React.PureComponent<
|
|||
|
||||
if (e.key === ' ') {
|
||||
this.open();
|
||||
e.preventDefault();
|
||||
} else if (selectedOptions.length && e.key == 'Backspace') {
|
||||
this.removeItem(selectedOptions.length - 1);
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ export default class TreeSelectControl extends React.Component<
|
|||
handleKeyPress(e: React.KeyboardEvent) {
|
||||
if (e.key === ' ') {
|
||||
this.handleClick();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue