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 @@ -51,7 +51,7 @@ export class KbqPasswordToggle {

/** Whether to display the password toggle. */
get visible(): boolean {
return !this.formField?.disabled && !!this.control?.ngControl?.value;
return !this.formField?.disabled;
}

/** Toggles the password visibility. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ DebugElement {
exports[`KbqFormField should hide KbqPasswordToggle initially 1`] = `
DebugElement {
"nativeNode": <kbq-password-toggle
aria-hidden="true"
class="kbq-password-toggle kbq kbq-icon-button kbq-contrast-fade kbq-eye_16 cdk-visually-hidden"
style="visibility: hidden;"
aria-hidden="false"
class="kbq-password-toggle kbq kbq-icon-button kbq-contrast-fade kbq-eye_16"
style="visibility: visible;"
tabindex="0"
/>,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/form-field/password-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class KbqPasswordToggle extends KbqTooltipTrigger implements AfterViewIni
* @docs-private
*/
get visibility(): 'hidden' | 'visible' {
return this.control.disabled || this.control.empty ? 'hidden' : 'visible';
return this.control.disabled ? 'hidden' : 'visible';
}

constructor() {
Expand Down
Binary file modified packages/components/input/__screenshots__/02-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/components/input/__screenshots__/02-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.