mirror of
https://github.com/bitwarden/jslib
synced 2025-12-14 07:13:35 +00:00
* Extract SsoConfig enums to own file * Add ChangeStripSpaces directive * Move custom validators to jslib * Add a11y-invalid directive * Add and implement dirtyValidators * Create ssoConfigView model and factory methods * Add interface for select options * Don't build SsoConfigData if null Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
13 lines
353 B
TypeScript
13 lines
353 B
TypeScript
import { Directive, ElementRef, HostListener } from "@angular/core";
|
|
|
|
@Directive({
|
|
selector: "input[appInputStripSpaces]",
|
|
})
|
|
export class InputStripSpacesDirective {
|
|
constructor(private el: ElementRef<HTMLInputElement>) {}
|
|
|
|
@HostListener("input") onInput() {
|
|
this.el.nativeElement.value = this.el.nativeElement.value.replace(/ /g, "");
|
|
}
|
|
}
|