handleEnterKey method

  1. @override
void handleEnterKey(
  1. KeyboardEvent event
)
override

Implementation

@override
void handleEnterKey(html.KeyboardEvent event) {
  if (!showPopup) {
    showPopup = true;
  } else {
    var item = activeModel.activeItem;
    if (item != null) {
      if (!isOptionDisabled(item)) {
        onListItemSelected(item);

        if (isMultiSelect) {
          showPopup = false;
        }
      }
    } else if (closeOnEnter) {
      showPopup = false;
    }
  }
}