diff --git a/app/lib/components/Chat/FileSharing.jsx b/app/lib/components/Chat/FileSharing.jsx index 63a60db..60bd479 100644 --- a/app/lib/components/Chat/FileSharing.jsx +++ b/app/lib/components/Chat/FileSharing.jsx @@ -32,6 +32,8 @@ class FileSharing extends Component constructor(props) { super(props); + + this.fileInput = React.createRef(); } handleFileChange = (event) => @@ -42,10 +44,27 @@ class FileSharing extends Component } }; + handleClick = () => + { + // We want to open the file dialog when we click a button + // instead of actually rendering the input element itself. + this.fileInput.current.click(); + }; + render() { return ( - +