title: How to call defaultExportCsv() of ReactJS material-table from the overriden export function
body: <p>I'm a beginner in reactjs. I'm handling material-table (<a href="https://material-table.com/" rel="nofollow noreferrer">material-table.com</a>) which should be capable of download data with the custom filename with the current timestamp. This can be solved by assigning the desired filename to the property <code>options.exportFileName</code> in <code>&lt;MaterialTable&gt;</code>. However, this timestamp will contain time when the page rendered, but I need the timestamp when the export button was clicked. </p>
  
  <p>I was thinking if I can achieve this by calling <code>defaultExportCsv</code> from the overridden export function after setting the file name like below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function TableExport({model}) {
    const handleExportCsv = () =&gt; {
      options.exportFileName = 'filename_' + moment().format('YYYY-MM-DDTHHmmss');
      // calling defaultExportCsv here
    }
  
    return ( &lt;
      MaterialTable columns = {
        [{
            title: 'ID',
            field: 'id'
          },
          {
            title: 'Name',
            field: 'name'
          },
        ]
      }
      data = {
        model
      }
      title = "Title"
      options = {
        {
          columnsButton: true,
          exportButton: true,
          actionsColumnIndex: -1,
          exportCsv: handleExportCsv,
        }
      }
      /&gt;
    );
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm unable to call <code>defaultExportCsv()</code> from the <code>handleExportCsv()</code>, can somebody help me in this regard ?</p>