mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
空格弹出下拉框的时候,组织页面向下滚动
This commit is contained in:
parent
4b68ed91f6
commit
9408a6b544
@ -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
Block a user