title: Antd Resizable table columns in TypeScript
body: <p>I'm implementing <code>antd</code> <code>&lt;Table&gt;</code> component and need to make columns resizable with <code>react-resizable</code>.
  I was following the example in the <a href="https://ant.design/components/table/#components-table-demo-resizable-column" rel="nofollow noreferrer">documentation</a>, but since my project in in TypeScript and using functional components I had to refactor it and I've faced issues with typings.
  When I'm trying to implement that <code>onHeaderCell</code> from example:</p>
  <pre><code>const initialColumns: ColumnProps&lt;Row&gt;[] = myData.columns.map((column, index) =&gt; {
    return {
      ...
      onHeaderCell: (c: ColumnType&lt;Row&gt;) =&gt; ({
            width: c.width,
            onResize: handleResize(index),
          }),
      ...
    })
  </code></pre>
  <p>I'm getting this error:</p>
  <blockquote>
  <p>...
  The types returned by 'onHeaderCell(...)' are incompatible between these types.
  Type '{ width: string | number | undefined; onResize: (e: SyntheticEvent&lt;Element, Event&gt;, resizeData: ResizeCallbackData) =&gt; void; }' has no properties in common with type 'HTMLAttributes'.</p>
  </blockquote>
  <p>My <code>handleResize</code> looks like this:</p>
  <pre><code>const handleResize = (index: number) =&gt; (e: React.SyntheticEvent&lt;Element, Event&gt;, resizeData: ResizeCallbackData) =&gt; {
      const { size } = resizeData
      updateColumns((cols) =&gt; {
        const nextColumns = [...cols]
        nextColumns[index] = {
          ...nextColumns[index],
          width: size.width,
        }
        return nextColumns
      })
    }
  </code></pre>
  <p>I've moved <code>ResizableTitle</code> into separate component and <code>&lt;Table /&gt;</code> is implemented this way</p>
  <pre><code>const components = {
      header: {
        cell: ResizableTitle,
      },
    }
  
    return (
      &lt;Table
        bordered
        components={components}
        columns={columns} // columns come from the useState&lt;ColumnProps&lt;Row&gt;[]&gt;()
        ...
      /&gt;
    )
  </code></pre>
  <p>How can I change this to get desired results?</p>