Skip to content

Commit ebe438d

Browse files
committed
feat: Listen onchange event by default
In this update, the 'onchange' event was added to the form event listeners. This change was necessary because 'oninput' wasn't enough to capture all user interactions, particularly those involving the mouse like selecting a dropdown item. By capturing 'change' event, the application can keep track of user interactions more comprehensively.
1 parent d93ae69 commit ebe438d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class Form<A extends FormAttributes = FormAttributes> extends Com
5050
attrs.put(event, this.onsubmit.bind(this))
5151
}
5252
return (
53-
<form {...attrs.all()} onsubmit={this.onsubmit.bind(this)} oninput={this.oninput.bind(this)}>
53+
<form {...attrs.all()} onsubmit={this.onsubmit.bind(this)} oninput={this.oninput.bind(this)} onchange={this.oninput.bind(this)}>
5454
{vnode.children}
5555
</form>
5656
);

0 commit comments

Comments
 (0)