diff --git a/searchPages/searchUtils/entitiesSelection.component.ts b/searchPages/searchUtils/entitiesSelection.component.ts index 97e7981f..fd342cf4 100644 --- a/searchPages/searchUtils/entitiesSelection.component.ts +++ b/searchPages/searchUtils/entitiesSelection.component.ts @@ -135,6 +135,7 @@ export class EntitiesSelectionComponent { } this.selectedEntity = this.currentEntity; this.selectionChange.emit({ + init: true, entity: this.selectedEntity, simpleUrl: this.getUrl(true), advancedUrl: this.getUrl(false) diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 35e94209..3f4c7a8d 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -276,13 +276,14 @@
-
-
+
+
-
+
option < this.searchUtils.totalResults); + } } diff --git a/sharedComponents/advanced-search-input/advanced-search-input.component.ts b/sharedComponents/advanced-search-input/advanced-search-input.component.ts index 17562223..06c5d552 100644 --- a/sharedComponents/advanced-search-input/advanced-search-input.component.ts +++ b/sharedComponents/advanced-search-input/advanced-search-input.component.ts @@ -62,6 +62,18 @@ export class AdvancedSearchInputComponent implements AfterContentInit, OnDestroy ngOnDestroy() { } + focusNext(input: InputComponent | EntitiesSelectionComponent, event: any = null) { + if(!event || !event.init) { + setTimeout(() => { + if(input instanceof InputComponent) { + input.focus(true); + } else { + input.input.focus(true); + } + }, 100); + } + } + get length() { return this.inputs.length + this.entities.length; } diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index 62f69627..b2eec667 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -245,11 +245,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang } @Input() - set options(options: (Option | string) []) { + set options(options: (Option | string | number) []) { this.optionsArray = options.map(option => { - if (typeof option === 'string') { + if (typeof option === 'string' || typeof option === 'number') { return { - label: option, + label: option.toString(), value: option }; } else {