mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Fixed search filters having empty input buttons
This commit is contained in:
@@ -11,7 +11,9 @@
|
|||||||
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
||||||
<input type="submit" class="d-none"/>
|
<button class="sr-only" type="submit">
|
||||||
|
{{'search.filters.search.submit' | translate}}
|
||||||
|
</button>
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -2,6 +2,7 @@ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { OrgUnitInputSuggestionsComponent } from './org-unit-input-suggestions.component';
|
import { OrgUnitInputSuggestionsComponent } from './org-unit-input-suggestions.component';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
let component: OrgUnitInputSuggestionsComponent;
|
let component: OrgUnitInputSuggestionsComponent;
|
||||||
let fixture: ComponentFixture<OrgUnitInputSuggestionsComponent>;
|
let fixture: ComponentFixture<OrgUnitInputSuggestionsComponent>;
|
||||||
@@ -21,6 +22,7 @@ describe('OrgUnitInputSuggestionsComponent', () => {
|
|||||||
declarations: [OrgUnitInputSuggestionsComponent],
|
declarations: [OrgUnitInputSuggestionsComponent],
|
||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
TranslateModule.forRoot(),
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
],
|
],
|
||||||
|
@@ -12,7 +12,9 @@
|
|||||||
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
||||||
<input type="submit" class="d-none"/>
|
<button class="sr-only" type="submit">
|
||||||
|
{{'search.filters.search.submit' | translate}}
|
||||||
|
</button>
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
||||||
<input type="submit" class="d-none"/>
|
<button class="sr-only" type="submit">
|
||||||
|
{{'search.filters.search.submit' | translate}}
|
||||||
|
</button>
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -20,10 +20,9 @@
|
|||||||
[ngModelOptions]="{standalone: true}" autocomplete="off"
|
[ngModelOptions]="{standalone: true}" autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<label class="d-none">
|
<button class="sr-only" type="submit">
|
||||||
<input type="submit"/>
|
{{'search.filters.search.submit' | translate}}
|
||||||
<span>{{'search.filters.search.submit' | translate}}</span>
|
</button>
|
||||||
</label>
|
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
|
||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
[ngModelOptions]="{standalone: true}" autocomplete="off"/>
|
||||||
<input type="submit" class="d-none"/>
|
<button class="sr-only" type="submit">
|
||||||
|
{{'search.filters.search.submit' | translate}}
|
||||||
|
</button>
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -10,7 +10,9 @@
|
|||||||
[placeholder]="placeholder"
|
[placeholder]="placeholder"
|
||||||
ng-model-options="{standalone: true}"
|
ng-model-options="{standalone: true}"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<input type="submit" class="d-none"/>
|
<button class="sr-only" type="submit">
|
||||||
|
{{'search.filters.search.submit' | translate}}
|
||||||
|
</button>
|
||||||
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
<div class="autocomplete dropdown-menu" [ngClass]="{'show': (show | async) && isNotEmpty(suggestions)}">
|
||||||
<div class="dropdown-list">
|
<div class="dropdown-list">
|
||||||
<div *ngFor="let suggestionOption of suggestions">
|
<div *ngFor="let suggestionOption of suggestions">
|
||||||
|
@@ -26,10 +26,9 @@
|
|||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<label class="d-none">
|
<button class="sr-only" type="submit">
|
||||||
<input type="submit" class="d-none"/>
|
{{'search.filters.search.submit' | translate}}
|
||||||
<span>{{'search.filters.search.submit' | translate}}</span>
|
</button>
|
||||||
</label>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<ng-container *ngIf="shouldShowSlider()">
|
<ng-container *ngIf="shouldShowSlider()">
|
||||||
|
Reference in New Issue
Block a user