[@types/react] can't do event.target.value
for event: React.ClipboardEvent<HTMLTextAreaElement>
#69635
-
import React from 'react';
const handle = (
event: React.ClipboardEvent<HTMLTextAreaElement>,
) => {
console.log(event.target.value);
}; results in
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for the discussion about "react", some useful links for everyone: Pinging the DT module owners: @johnnyreilly, @bbenezech, @pzavolinsky, @ericanderson, @DovydasNavickas, @theruther4d, @guilhermehubner, @ferdaber, @jrakotoharisoa, @pascaloliv, @Hotell, @franklixuefei, @Jessidhia, @saranshkataria, @lukyth, @eps1lon, @zieka, @dancerphil, @dimitropoulos, @disjukr, @vhfmag, @hellatan, @priyanshurav, @Semigradsky, @mattpocock. |
Beta Was this translation helpful? Give feedback.
-
You want to use |
Beta Was this translation helpful? Give feedback.
You want to use
currentTarget
here. Clipboard events bubble and it's therefore unsound to assumetarget
is the same as where the event handler was attached.