title: react app how can I set the state of the radio button in an antd table?
body: <p>I try to understand antd.</p>
  <p>I have here from the documentation Table Example 3.
  When the radio button is clicked, this state is set and the row is selected.
  If i clicked a cell of a row, the row should also be selected and the ckeck state of the radio button should be set.</p>
  <p>Does anyone have any idea how to do that?</p>
  <pre><code>import React from 'react';
  import { Table } from 'antd';
  import 'antd/dist/antd.css';
  
  const columns = [
      {
          title: 'Name',
          dataIndex: 'name',
          render: (text: string) =&gt; &lt;a&gt;{text}&lt;/a&gt;,
      },
      {
          title: 'Age',
          dataIndex: 'age',
      },
      {
          title: 'Address',
          dataIndex: 'address',
      },
  ];
  
  interface DataType {
      key: React.Key;
      name: string;
      age: number;
      address: string;
  }
  
  const data: DataType[] = [
      {
          key: '1',
          name: 'John Brown',
          age: 32,
          address: 'New York No. 1 Lake Park',
      },
      {
          key: '2',
          name: 'Jim Green',
          age: 42,
          address: 'London No. 1 Lake Park',
      },
      {
          key: '3',
          name: 'Joe Black',
          age: 32,
          address: 'Sidney No. 1 Lake Park',
      },
      {
          key: '4',
          name: 'Disabled User',
          age: 99,
          address: 'Sidney No. 1 Lake Park',
      },
  ];
  
  // rowSelection object indicates the need for row selection
  const rowSelection = {
      onChange: (selectedRowKeys: React.Key[], selectedRows: DataType[]) =&gt; {
          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
      },
  };
  
  
  export default function TableDemo() {
  
      return (
          &lt;React.Fragment&gt;
              &lt;Table
                  rowSelection={{
                      type: 'radio',
                      ...rowSelection,
                  }}
                  columns={columns}
                  dataSource={data}
                  
              /&gt;
  
          &lt;/React.Fragment&gt;
      );
  }
  </code></pre>