I am using Shadcn Component. So, I have these buttons in my form. I need to trigger onsubmit only on certain button(Create Button). But it does'nt trigger onsubmit. I even disabled validation. nothing works.
Aditional Context
If i explicitly mention onClick for that button it works. like this
onClick={() => props.handleSubmit()}
Expected behavior
I have explicitly mentioned the button type as "submit" for the submission button and "button" for others. It should trigger onsubmit onclicking create button.
Bug report
Current Behavior
`
<div
className={cn("flex gap-4 items-center", {
"justify-between": currentSection === 1,
"justify-end": currentSection === 0,
})}
I am using Shadcn Component. So, I have these buttons in my form. I need to trigger onsubmit only on certain button(Create Button). But it does'nt trigger onsubmit. I even disabled validation. nothing works.
Aditional Context
If i explicitly mention onClick for that button it works. like this
onClick={() => props.handleSubmit()}
Expected behavior
I have explicitly mentioned the button type as "submit" for the submission button and "button" for others. It should trigger onsubmit onclicking create button.
Reproducible example
Use multiple buttons in form.