packages/components/directives/eui-loading.directive.ts
Directive displaying a loading spinner icon inside input fields during async operations. Dynamically creates and positions a loading icon that appears when euiLoading is true. Automatically manages wrapper div for icon positioning and handles readonly state. Compatible with euiClearable directive for combined loading and clear functionality.
Example :<input euiInputText [euiLoading]="isSearching" [(ngModel)]="searchTerm" />isSearching = false;
onSearch() {
this.isSearching = true;
this.api.search().subscribe(() => this.isSearching = false);
}
| Selector | [euiLoading] |
Inputs |
HostBindings |
Accessors |
| euiLoading |
Type : boolean
|
| readonly |
Type : any
|
| class |
Type : string
|
| readonly | ||||||
getreadonly()
|
||||||
setreadonly(v: BooleanInput)
|
||||||
|
Parameters :
Returns :
void
|
| cssClasses | ||||||
getcssClasses()
|
||||||
setcssClasses(value: string)
|
||||||
|
Parameters :
Returns :
void
|