1
0
mirror of synced 2025-03-12 07:36:09 +03:00

clicking down arrow or enter in multisearch combo now expands, closes #5565

This commit is contained in:
Igor Vaynberg 2019-07-17 08:13:24 -07:00
parent 44a88a9c56
commit 32b8818c1b
3 changed files with 24 additions and 15 deletions

View File

@ -346,13 +346,13 @@ export class MultiSelect extends AbstractSelect<Props, State> {
}; };
public onSearchKeyDown = (event: KeyboardEvent) => { public onSearchKeyDown = (event: KeyboardEvent) => {
const { open } = this.state;
if (open) {
if (this.handleResultNavigationKeyDown(event)) { if (this.handleResultNavigationKeyDown(event)) {
return; return;
} }
if (this.hasSearchResults) {
const { open } = this.state;
if (open && this.hasSearchResults) {
switch (event.key) { switch (event.key) {
case Key.Enter: case Key.Enter:
this.selectActiveResult(); this.selectActiveResult();
@ -366,6 +366,15 @@ export class MultiSelect extends AbstractSelect<Props, State> {
break; break;
} }
} }
} else {
switch (event.key) {
case Key.ArrowDown:
case Key.Down:
case Key.Enter:
this.search('', this.props.values, { open: true });
break;
}
}
}; };
public onValueClick = (index: number) => (event: MouseEvent) => { public onValueClick = (index: number) => (event: MouseEvent) => {

2
dist/select25.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long