NumberInputDirective
Defined in: directives/input/number-input.directive.ts:22
Directive that restricts user input to numeric characters. Non-numeric key presses are blocked unless the key is included in the internal bypass list (e.g., navigation keys, shortcuts).
Since
1.2.0
Author
Simon Kovtyk
Constructors
Constructor
ts
new NumberInputDirective(): NumberInputDirective;Returns
NumberInputDirective
Methods
handleInput()
ts
handleInput(keyboardEvent): void;Defined in: directives/input/number-input.directive.ts:61
Handles keydown events on the host element and prevents any key that is not a valid number and not part of the allowed bypass keys.
Parameters
| Parameter | Type | Description |
|---|---|---|
keyboardEvent | KeyboardEvent | The keyboard event triggered by the user's key press. |
Returns
void
Since
1.2.0
Author
Simon Kovtyk