Skip to content

"keyup" or "input" best practice for autocomplete input field? #24960

Closed
@simonferndriger

Description

@simonferndriger

In the https://angular.io/tutorial/toh-pt6#search-by-name tutorial, for the input field, the event "keyup" is used in the example: <input #searchBox id="search-box" (keyup)="search(searchBox.value)" />

But wouldn't it be a better (best) practice to use the "input" event instead? Such that the input field also reacts on copy/paste via mouse for example?

Metadata

Metadata

Labels

freq3: highrefactoringIssue that involves refactoring or code-cleanup

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions