primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Change default button type to button

Open lqthaiegi opened this issue 6 years ago • 1 comments

I'm submitting a ... (check one with "x")

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior There is no default type for button (So the button type will be submit, but most of the cases we are using is button)

Expected behavior Set default button type is button

React version: 16.13.1

PrimeReact version: 5.0.0-rc.2

Browser: [all]

Language: [all]

lqthaiegi avatar Sep 20 '20 09:09 lqthaiegi

Hi,

It is implemented according to HTML Button spec. Please see;

Always specify the type attribute for the button. The default type for Internet Explorer is "button", while in other browsers (and in the W3C specification) it is "submit". https://www.w3schools.com/jsref/prop_pushbutton_type.asp You can use type property on Button

Best Regards,

mertsincan avatar Sep 20 '20 17:09 mertsincan