ui
ui copied to clipboard
fix(carousel): Prevent form submission from Carousel next/previous buttons
As described in issue https://github.com/shadcn-ui/ui/issues/2358, this fix applies type property to buttons with a default of "button" which prevents default form submission behavior when <button>
resides within <form>
.
@josephdburdick is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
I think it would be better to add a default value of "button"
for type
prop directly in the Button component so that this kind of issues will not happen with other components as well.
IMHO it's also a good practice to be forced to explicitly set the type submit to submit buttons.
I think it would be better to add a default value of
"button"
fortype
prop directly in the Button component so that this kind of issues will not happen with other components as well. IMHO it's also a good practice to be forced to explicitly set the type submit to submit buttons.
I agree with this. I would try again to make a PR but I am unfamiliar with the process here, my last PR remained open and after a few weeks became out of sync.