title: React Open file dialog
body: <p>I am trying to open a File Dialog Box with React, so that the user can select a folder and save the file in that particular folder, however I cannot manage to do that.  My code looks like this at the moment:-</p>
  
  <pre><code>const exportToCSV = (csvData, fileName) =&gt; {
      const ws = XLSX.utils.json_to_sheet(csvData);
      const wb = { Sheets: { 'data': ws }, SheetNames: ['data'] };
      const excelBuffer = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
      const data = new Blob([excelBuffer], {type: fileType});
      FileSaver.saveAs(data, fileName + fileExtension);
  }
  
  const openDialogWindow = () =&gt; {
       // Open dialog here and get the folder name
       exportToCSV(csvData, (folderName + fileName))     
  };
  
  
  
  return (
      &lt;button
      id="btnExportToCSV"
      onClick={(e) =&gt; openDialogWindow()}
      &gt;
          Export Tasks To Excel
      &lt;/button&gt;
  )
  </code></pre>
  
  <p>so in my openDialogWindow, I would like to have the option to open the dialog box, and let the user select a folder that I can then attach to the pre-defined fileName.  This will give the user the option to save the file in his chosen directory.</p>
  
  <p>Is this possible?</p>
  
  <p>Thanks for your help and time!</p>