trigger the autocompleter on input focus when field is not empty

pull/6929/head
Wieland Lindenthal 6 years ago
parent 6cd7c316be
commit 0b30d74804
  1. 6
      frontend/src/app/components/global-search/global-search-input.component.ts

@ -191,6 +191,12 @@ export class GlobalSearchInputComponent implements OnDestroy {
return this.renderWorkPackageItem(item.item as WorkPackageResource).appendTo(ul);
}
};
this.$input.on('focus', () => {
if (this.searchValue.length > 0) {
this.$input.autocomplete('search', this.searchValue);
}
});
}
// detect if click is outside or inside the element

Loading…
Cancel
Save