Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@
(scrolled)="onScroll()"
[scrollWindow]="false">

<button class="dropdown-item disabled"
<button class="dropdown-item disabled" type="button"
*ngIf="optionsList && optionsList.length === 0"
(click)="$event.stopPropagation(); clearFields(); sdRef.close();">{{'form.no-results' | translate}}
(click)="$event.stopPropagation(); clearFields(); sdRef.close();">
{{ 'form.no-results' | translate }}
</button>
<button class="dropdown-item lookup-item"
<button class="dropdown-item lookup-item" type="button"
*ngFor="let listEntry of optionsList"
(click)="$event.stopPropagation(); onSelect(listEntry); sdRef.close();"
title="{{ listEntry.display }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@
(scrolled)="onScroll()"
[scrollWindow]="false">

<button class="dropdown-item disabled" *ngIf="optionsList && optionsList.length === 0">{{'form.no-results' | translate}}</button>
<button class="dropdown-item disabled" type="button" *ngIf="optionsList && optionsList.length === 0">{{'form.no-results' | translate}}</button>
<button class="dropdown-item collection-item text-truncate"
(click)="onSelect(undefined); sdRef.close()" (mousedown)="onSelect(undefined); sdRef.close()"
title="{{ 'dropdown.clear.tooltip' | translate }}" role="option"
>
type="button">
<i>{{ 'dropdown.clear' | translate }}</i>
</button>
<button class="dropdown-item collection-item text-truncate" *ngFor="let listEntry of optionsList; let i = index"
[class.active]="i === selectedIndex"
(keydown.enter)="onSelect(listEntry); sdRef.close()" (mousedown)="onSelect(listEntry); sdRef.close()"
title="{{ listEntry.display }}" role="option"
title="{{ listEntry.display }}" role="option" type="button"
[attr.id]="listEntry.display === (currentValue|async) ? ('combobox_' + id + '_selected') : null">
{{inputFormatter(listEntry)}}
</button>
Expand Down
3 changes: 3 additions & 0 deletions src/app/shared/form/form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@
}

public addControlErrors(field: AbstractControl, formId: string, fieldId: string, fieldIndex: number) {
if (field.errors === null) {
return;

Check warning on line 157 in src/app/shared/form/form.service.ts

View check run for this annotation

Codecov / codecov/patch

src/app/shared/form/form.service.ts#L157

Added line #L157 was not covered by tests
}
const errors: string[] = Object.keys(field.errors)
.filter((errorKey) => field.errors[errorKey] === true)
.map((errorKey) => `error.validation.${errorKey}`);
Expand Down
Loading