fix: allow copying multiline text

This commit is contained in:
Oliver Sand
2020-09-09 15:08:03 +02:00
parent 2615cafd5d
commit 500038a300
@@ -63,7 +63,7 @@ export const CopyTextButton: FC<Props> = props => {
};
const classes = useStyles(props);
const errorApi = useApi(errorApiRef);
const inputRef = useRef<HTMLInputElement>(null);
const inputRef = useRef<HTMLTextAreaElement>(null);
const [open, setOpen] = useState(false);
const handleCopyClick: MouseEventHandler = e => {
@@ -82,9 +82,8 @@ export const CopyTextButton: FC<Props> = props => {
return (
<>
<input
<textarea
ref={inputRef}
type="text"
style={{ position: 'absolute', top: -9999, left: 9999 }}
defaultValue={text}
/>