Skip to content

extend onSubmit to press of button for useSearchField #3689

Answered by snowystinger
PixeledCode asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not quite sure what you're asking for. onSubmit is a form event. https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event so you wouldn't put it on a button. You'd put it on a form and you'd have a submit button inside that form.
Let me know if that answers your question.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@PixeledCode
Comment options

@snowystinger
Comment options

@PixeledCode
Comment options

@snowystinger
Comment options

@PixeledCode
Comment options

Answer selected by PixeledCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants