diff options
Diffstat (limited to 'client/src/app/header/suggestion.component.ts')
-rw-r--r-- | client/src/app/header/suggestion.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/header/suggestion.component.ts b/client/src/app/header/suggestion.component.ts index 75c44a583..bdcb3e03f 100644 --- a/client/src/app/header/suggestion.component.ts +++ b/client/src/app/header/suggestion.component.ts | |||
@@ -3,10 +3,11 @@ import { RouterLink } from '@angular/router' | |||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | 3 | import { I18n } from '@ngx-translate/i18n-polyfill' |
4 | import { ListKeyManagerOption } from '@angular/cdk/a11y' | 4 | import { ListKeyManagerOption } from '@angular/cdk/a11y' |
5 | 5 | ||
6 | type Result = { | 6 | export type Result = { |
7 | text: string | 7 | text: string |
8 | type: 'channel' | 'suggestion' | 'search-channel' | 'search-instance' | 'search-global' | 'search-any' | 8 | type: 'channel' | 'suggestion' | 'search-channel' | 'search-instance' | 'search-global' | 'search-any' |
9 | routerLink?: RouterLink | 9 | routerLink?: RouterLink, |
10 | default?: boolean | ||
10 | } | 11 | } |
11 | 12 | ||
12 | @Component({ | 13 | @Component({ |
@@ -39,7 +40,7 @@ export class SuggestionComponent implements OnInit, ListKeyManagerOption { | |||
39 | } | 40 | } |
40 | 41 | ||
41 | ngOnInit () { | 42 | ngOnInit () { |
42 | this.active = false | 43 | if (this.result.default) this.active = true |
43 | } | 44 | } |
44 | 45 | ||
45 | selectItem () { | 46 | selectItem () { |