Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

disable key enter react-hook-form

 const checkKeyDown = (e) => {
    if (e.code === 'Enter') e.preventDefault();
  };

<form onSubmit={handleSubmit(onSubmit)} onKeyDown={(e) => checkKeyDown(e)}>
  // your steps here 
</form>
Comment

PREVIOUS NEXT
Code Example
Javascript :: loop array reverse 
Javascript :: is node js faster than python 
Javascript :: javascript check if variable is object 
Javascript :: vowel 
Javascript :: javascript class access static property 
Javascript :: check url with javascript 
Javascript :: express request body undefined 
Javascript :: return empty new promise 
Javascript :: access session data from ejs view 
Javascript :: route pass props to component 
Javascript :: js set css variable 
Javascript :: safeareaview react native android 
Javascript :: jquery get value of input submit 
Javascript :: how to remove comma from array in javascript 
Javascript :: javascript array find element by id 
Javascript :: react js onclick call two functions 
Javascript :: how to change text color in react 
Javascript :: javascript copy image to clipboard 
Javascript :: mongoose increment sub document 
Javascript :: jquery in array 
Javascript :: next js script 
Javascript :: strapi change user password 
Javascript :: nodejs javascript heap out of memory 
Javascript :: javascript how to check if array is empty 
Javascript :: isnan javascript 
Javascript :: vuex add multiple payload to mutation 
Javascript :: complex json example 
Javascript :: download json file react 
Javascript :: stop interval js 
Javascript :: retrieve data from option select js 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =