title: How to immediately update summary value, when column value in antd Table changes?
body: <p>I want to display a &quot;simple&quot; table, where rows are dynamically added. The records have a property <code>harn</code> and <code>amount</code>. Both are used to display a total amount using the formula <code>harn * amount / 100</code>.</p>
  <p>This is my column definition:</p>
  <pre><code>const columns = [
    {
      //omitted;
    },
    {
      title: &quot;Amount&quot;,
      dataIndex: &quot;amount&quot;,
      render: (text, record, index) =&gt; {
          return (
              &lt;InputNumber
                  defaultValue={record.amount}
                  min={0}
                  formatter={value =&gt; `${value}g`}
                  parser={value =&gt; value?.replace('g', '') || 0}
                  onChange={e =&gt; {
                     record.amount = e
                  }}
              /&gt;
          )
      }
    }
  </code></pre>
  <p>With the summary definition:</p>
  <pre><code>const summary = (data: readonly TableFoodType[]) =&gt; {
      let totalHarn: number = 0
      data.forEach(({ harn, amount }) =&gt; {
          totalHarn += harn * (amount / 100)
      })
      return (
          &lt;Table.Summary.Row&gt;
              &lt;Table.Summary.Cell index={0}&gt;&lt;span&gt;Total: &lt;/span&gt;&lt;/Table.Summary.Cell&gt;
              &lt;Table.Summary.Cell index={1}&gt;
                  {totalHarn}
              &lt;/Table.Summary.Cell&gt;
          &lt;/Table.Summary.Row&gt;
      )
  }
  </code></pre>
  <p>My goal is to update the summary, whenever a user updates the amount input in the cell, without explicitly saving, but I am at a loss on how to write the changed value from the <code>InputNumber</code> directly back into the record. As it stands right now, the summary is not being updated.</p>
  <p>The documentation for an editable cell (<a href="https://ant.design/components/table/#components-table-demo-edit-cell" rel="nofollow noreferrer">https://ant.design/components/table/#components-table-demo-edit-cell</a>) looks hideously complex for a seemingly simple task like that, so I am wondering, if there was an easy way, that I am not seeing right now.</p>
  <p>The whole compoenent is not designed to persist data, so all I am about right now, is to alter and display it immediately.</p>