MOBILE-3833 show-password: fix show password eye icon
This commit is contained in:
		
							parent
							
								
									2e584357e7
								
							
						
					
					
						commit
						70a4f1df40
					
				| @ -1,6 +1,5 @@ | ||||
| <ng-content></ng-content> | ||||
| <ion-button fill="clear" [attr.aria-label]="label | translate" core-suppress-events (onClick)="toggle($event)" | ||||
|     (mousedown)="doNotBlur($event)" (keydown)="doNotBlur($event)" (keyup)="toggle($event)"> | ||||
|     <ion-icon [name]=" iconName" slot="icon-only" aria-hidden="true"> | ||||
|     </ion-icon> | ||||
|     <ion-icon [name]="shown ? 'fas-eye-slash' : 'fas-eye'" slot="icon-only" aria-hidden="true"></ion-icon> | ||||
| </ion-button> | ||||
|  | ||||
| @ -46,7 +46,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit { | ||||
| 
 | ||||
|     shown = false; // Whether the password is shown.
 | ||||
|     label = ''; // Label for the button to show/hide.
 | ||||
|     iconName = ''; // Name of the icon of the button to show/hide.
 | ||||
| 
 | ||||
|     protected input?: HTMLInputElement; // Input affected.
 | ||||
|     protected element: HTMLElement; // Current element.
 | ||||
| @ -99,7 +98,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit { | ||||
|      */ | ||||
|     protected setData(input: HTMLInputElement): void { | ||||
|         this.label = this.shown ? 'core.hide' : 'core.show'; | ||||
|         this.iconName = this.shown ? 'fas-eye-slash' : 'fas-eye'; | ||||
|         input.type = this.shown ? 'text' : 'password'; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user