Skip to content

Commit

Permalink
[SDESK-4654] Handle the enter key in Selecting subject codes etc. (su…
Browse files Browse the repository at this point in the history
  • Loading branch information
marwoodandrew authored and nrvikas committed Sep 6, 2019
1 parent 16314a2 commit 076c8fc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ export class SelectFieldPopup extends React.Component {
if (this.props.multiLevel) {
if (this.state.activeOptionIndex !== -1) {
this.onSelect(this.state.filteredList[this.state.activeOptionIndex]);
} else {
this.onSelect(this.state.currentParent);
} else if (this.state.filteredList.length == 1) {
this.onSelect(this.state.filteredList[0]);
}
} else if (this.state.activeOptionIndex !== -1) {
this.onSelect(this.state.filteredList[this.state.activeOptionIndex]);
} else if (this.state.filteredList.length == 1) {
this.onSelect(this.state.filteredList[0]);
}
}

Expand Down

0 comments on commit 076c8fc

Please sign in to comment.