Fix prevent default only for submit (#1102)
This commit is contained in:
parent
372ee9e943
commit
bf93113b26
@ -281,11 +281,11 @@ export const isTrue = (val) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Prevent the default event.
|
||||
* Prevent the default event for form submission.
|
||||
* @param event
|
||||
*/
|
||||
export const preventDefault = (event) => {
|
||||
if (event && event.preventDefault) {
|
||||
if (event && event.type == "submit") {
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user