I am using onPaste event in react on an input field and want to get its value inside function but e.target.value is returning blank value. Is there any way to get input value onPaste event.
You can use e.clipboardData.getData('Text') which will return you text that is copied on clipboard and you are pasting it inside input. The code function can be written as
You can use e.clipboardData.getData('Text') which will return you text that is copied on clipboard and you are pasting it inside input. The code function can be written as