title: passing data from antdesign table row to modal
body: <p>I have a table in which each row has a button that would send a <code>DELETE</code> request to delete that row's data from database:</p>
  <pre><code>{
      title: '',
      render: (record) =&gt; {
          return (
              &lt;Button icon={&lt;DeleteOutlined /&gt;} style={{color:'#1890ff', border:'solid 0px'}} onClick={() =&gt; showModal(record)}
              &gt;
              &lt;/Button&gt;
          ) 
      }
  },
  </code></pre>
  <p>Here I'm trying to pass the <code>record</code> data when clicking on the button to a modal. To do that I created a <code>useState</code> hook that would store my table row's data and then I wanted to pass the data to a modal:</p>
  <pre><code>const [modalTaskId, setModalTaskId] = useState();
  const [visible, setVisible] = useState(false);
  const showModal = (record) =&gt; {
      setModalTaskId(record);
      setVisible(true);
  
  };
  </code></pre>
  <p>This is my modal:</p>
  <pre><code>&lt;Modal
      visible={visible}
      onOk={() =&gt;{handleOk()}}
      confirmLoading={confirmLoading}
      onCancel={handleCancel}
  &gt;
      &lt;p&gt;{modalText}&lt;/p&gt;
  &lt;/Modal&gt;
  </code></pre>
  <p>And let's say I want to log the <code>modalTaskId</code> when clicking ok on modal:</p>
  <pre><code>const handleOk = async () =&gt; {
      console.log('modalTaskId: ', modalTaskId)
  }
  </code></pre>
  <p>But it logs empty for me! So how can I pass data from my table's row to my modal and then use that data when clicking on modal's ok button?</p>