title: How can I call a custom function in "onFilter" in ant design?
body: <p>I would like to call a custom function in &quot;onFilter&quot; property given by ant design on columns. I can go for the custom filter dropdown as an option but I would like to use the default filter option given by ant design. i.e</p>
  <pre><code>{
    title: 'Address',
    dataIndex: 'address',
    key: 'address',
    filters: [{
      text: 'London',
      value: 'London',
    }, {
      text: 'New York',
      value: 'New York',
    }],
    onFilter: (value, record) =&gt; record.address.indexOf(value) === 0,
  }
  </code></pre>
  <p>But the only thing I need to change here is a custom function (that will trigger the api call and set the new data in the redux state so the component will re render it self) something like</p>
  <pre><code>{
    ...
    onFilter: (value, record) =&gt; this.getFilteredData(value),
  }
  </code></pre>
  <p>But when I do this I get this error which does make sense too.</p>
  <blockquote>
  <p>Warning: setState(…): Cannot update during an existing state
  transition</p>
  </blockquote>
  <p>So kindly guide me on how to do that as I am new to react and ant design both.</p>