title: Is there a way to make api call when expanding table to show nested table?
body: <p>In Ant Nested table - When expanding a row, I want to make an api call and get the data to show the nested table.</p>
  
  <p>The function expandedRowRender, expects to return the nested table, it does not accept a promise.</p>
  
  <p>How can I show a nested Ant table using ajax call?</p>
  
  <p>I have tried to recreate the scenario for reference.</p>
  
  <pre><code>import ReactDOM from "react-dom";
  import "antd/dist/antd.css";
  import "./index.css";
  import { Table } from "antd";
  import reqwest from "reqwest";
  
  const nestedColumns = [
    {
      title: "Name",
      dataIndex: "name",
      sorter: true,
      render: name =&gt; `${name.first} ${name.last}`,
      width: "20%"
    },
    {
      title: "Gender",
      dataIndex: "gender",
      filters: [
        { text: "Male", value: "male" },
        { text: "Female", value: "female" }
      ],
      width: "20%"
    },
    {
      title: "Email",
      dataIndex: "email"
    }
  ];
  
  class App extends React.Component {
    state = {
      data: []
    };
  
    fetch = (params = {}) =&gt; {
      console.log("params:", params);
      reqwest({
        url: "https://randomuser.me/api",
        method: "get",
        data: {
          results: 10,
          ...params
        },
        type: "json"
      }).then(data =&gt; {
        return (
          &lt;Table
            columns={nestedColumns}
            dataSource={data.results}
            pagination={false}
          /&gt;
        );
        // this.setState({
        //   data: data.results
        // });
      });
    };
  
    expandedRowRender = () =&gt; {
      this.fetch();
      return &lt;table columns={nestedColumns} dataSource={this.state.data} /&gt;;
    };
  
    render() {
      const columns = [
        { title: "Name", dataIndex: "name", key: "name" },
        { title: "Platform", dataIndex: "platform", key: "platform" },
        { title: "Version", dataIndex: "version", key: "version" }
      ];
  
      const data = [
        {
          key: 1,
          name: "Screem",
          platform: "iOS",
          version: "10.3.4.5654"
        }
      ];
  
      return (
        &lt;Table
          columns={columns}
          dataSource={data}
          pagination={false}
          expandedRowRender={this.expandedRowRender}
        /&gt;
      );
    }
  }
  
  ReactDOM.render(&lt;App /&gt;, document.getElementById("container"));
  </code></pre>