Skip to content

Commit

Permalink
fix: playground #67 type
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Nov 26, 2023
1 parent 687a871 commit c40a022
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions playground/src/67/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import ProTable, { type ProColumnType, type ProColumns } from '@ant-design/pro-table'
import ProTable, { type ProColumns } from '@ant-design/pro-table'
import Table, { type ColumnsType } from 'antd/es/table'
import { useState } from 'react'
import { useAntdResizableHeader } from 'use-antd-resizable-header'

export default function () {
const [proCols, _setProCols] = useState<ProColumns<any>[]>([])
const {} = useAntdResizableHeader<ProColumnType>({
const { resizableColumns: proResizableColumns } = useAntdResizableHeader({
columns: proCols,
})

const [cols, _setCols] = useState<ColumnsType>([{ title: 'Name', dataIndex: 'name' }])
const { resizableColumns } = useAntdResizableHeader<ColumnsType[number]>({
const [cols, _setCols] = useState<ColumnsType<any>>([{ title: 'Name', dataIndex: 'name' }])
const { resizableColumns } = useAntdResizableHeader({
columns: cols,
})

return (
<>
<ProTable columns={proCols}></ProTable>
<ProTable columns={proResizableColumns}></ProTable>
<Table columns={resizableColumns} />
</>
)
Expand Down

0 comments on commit c40a022

Please sign in to comment.