@engie-group/fluid-design-system-angular
Version:
Fluid Design System Angular
26 lines (25 loc) • 851 B
HTML
<div class="nj-search__field-wrapper">
<nj-icon name="search" ariaLabel="search icon" class="nj-search__icon"></nj-icon>
<label *ngIf="altLabel" [for]="finalInputId" class="nj-sr-only" aria-hidden="true">
{{ altLabel }}
</label>
<input
type="search"
class="nj-search__field"
[]="finalInputId"
[]="value"
[]="placeholder"
[]="isDisabled"
(focus)="onTouched?.()"
(keydown.enter)="enterKeydown.next()"
(ngModelChange)="valueChange($event)">
<nj-icon-button
*ngIf="value?.length > 0"
icon="cancel"
class="nj-search__clear-button"
[]="altResetButtonLabel"
[]="isDisabled"
(buttonClick)="onClearValue()"></nj-icon-button>
</div>
<ng-container *ngIf="actionTemplate" [ngTemplateOutlet]="actionTemplate"></ng-container>