Merge pull request #4955 from GabrielInTheWorld/hotfixSuperSearch
Hotfix for global search
This commit is contained in:
commit
899eedf403
@ -213,7 +213,9 @@ export class SearchService {
|
||||
.filter(model =>
|
||||
dedicatedId
|
||||
? model.id === dedicatedId
|
||||
: model.formatForSearch().searchValue.some(text => text.toLowerCase().indexOf(query) !== -1)
|
||||
: model
|
||||
.formatForSearch()
|
||||
.searchValue.some(text => text && text.toLowerCase().indexOf(query) !== -1)
|
||||
)
|
||||
.sort((a, b) => {
|
||||
switch (sortingProperty) {
|
||||
|
@ -304,6 +304,7 @@ export class SuperSearchComponent implements OnInit {
|
||||
* @param event KeyboardEvent to listen to keyboard-inputs.
|
||||
*/
|
||||
@HostListener('document:keydown', ['$event']) public onKeyNavigation(event: KeyboardEvent): void {
|
||||
if (!!this.selectedModel) {
|
||||
if (event.key === 'Enter') {
|
||||
this.viewResult(this.selectedModel);
|
||||
}
|
||||
@ -313,6 +314,7 @@ export class SuperSearchComponent implements OnInit {
|
||||
if (event.key === 'ArrowDown') {
|
||||
this.selectNextResult(false);
|
||||
}
|
||||
}
|
||||
if (event.altKey && event.shiftKey && event.key === 'V') {
|
||||
this.showPreview = !this.showPreview;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user