Fixed search filters having empty input buttons

This commit is contained in:
Alexandre Vryghem
2023-12-16 01:31:34 +01:00
parent 086c5463a8
commit 3c1243f6f1
8 changed files with 23 additions and 13 deletions

View File

@@ -11,7 +11,9 @@
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
[placeholder]="placeholder"
[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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -2,6 +2,7 @@ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { OrgUnitInputSuggestionsComponent } from './org-unit-input-suggestions.component';
import { FormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
let component: OrgUnitInputSuggestionsComponent;
let fixture: ComponentFixture<OrgUnitInputSuggestionsComponent>;
@@ -21,6 +22,7 @@ describe('OrgUnitInputSuggestionsComponent', () => {
declarations: [OrgUnitInputSuggestionsComponent],
imports: [
FormsModule,
TranslateModule.forRoot(),
],
providers: [
],

View File

@@ -12,7 +12,9 @@
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
[placeholder]="placeholder"
[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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -9,7 +9,9 @@
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
[placeholder]="placeholder"
[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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -20,10 +20,9 @@
[ngModelOptions]="{standalone: true}" autocomplete="off"
/>
</ng-template>
<label class="d-none">
<input type="submit"/>
<span>{{'search.filters.search.submit' | translate}}</span>
</label>
<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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -9,7 +9,9 @@
[dsDebounce]="debounceTime" (onDebounce)="find($event)"
[placeholder]="placeholder"
[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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -10,7 +10,9 @@
[placeholder]="placeholder"
ng-model-options="{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="dropdown-list">
<div *ngFor="let suggestionOption of suggestions">

View File

@@ -26,10 +26,9 @@
/>
</label>
</div>
<label class="d-none">
<input type="submit" class="d-none"/>
<span>{{'search.filters.search.submit' | translate}}</span>
</label>
<button class="sr-only" type="submit">
{{'search.filters.search.submit' | translate}}
</button>
</form>
<ng-container *ngIf="shouldShowSlider()">