Skip to content

Commit

Permalink
refactor: demo component field
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandopasik committed Nov 22, 2024
1 parent d67f50f commit 8ffa2a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class MyContact extends LitElement {
@property({ type: String })
protected email = '';

public save(prop: 'email' | 'name'): (event: Event) => void {
return (event: Event): void => {
this[prop] = (event.target as HTMLInputElement).value;
public save(prop: 'email' | 'name'): (event: InputEvent) => void {
return (event: InputEvent): void => {
this[prop] = event.data ?? '';
};
}

Expand Down

0 comments on commit 8ffa2a2

Please sign in to comment.