Skip to content

Insert, remove and reorder intents do not work with button type = button #482

Answered by edmundhung
hauptrolle asked this question in Q&A
Discussion options

You must be logged in to vote

All form intent are designed to work before JS. Making it type button means it will not work the way it is designed. Why do you wanna restrict it?

Anyway, if you really have to do this, you can always setup a onClick handler and trigger the form intent directly:

<button type="button" onClick={() => form.reset()} />

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@edmundhung
Comment options

@hauptrolle
Comment options

Answer selected by hauptrolle
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
Converted from issue

This discussion was converted from issue #481 on February 22, 2024 19:03.