-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The type of the 'record' argument of render func in the 'columns' props of the table is showing up as any. #48960
Comments
Hello @minjinso. Please provide a online reproduction by forking codesandbox of antd@5.x or antd@4.x, or provide a minimal GitHub repository. Issues labeled by 你好 @minjinso,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 antd@5.x 或 antd@4.x 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 |
-- <CustomTable
++ <CustomTable<Temp> When you wrap with HOC, ts at least need a case for infer the generic type. Your HOC component do not have it so can add on component directly. |
Hello @minjinso, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to open a new discussion in antd discussions, select 你好 @minjinso,Ant Design Issue 板块是用于 bug 反馈与需求讨论的地方。请勿询问如何使用的问题,你可以试着在 antd discussions 新开一个 discussion,选择 |
Reproduction link
https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-95c7mg?file=%2FApp.tsx%3A27%2C22
Steps to reproduce
What is expected?
Defining "render" method of column, the type of record should be E (that I assigned).
What is actually happening?
The RecordType is any, so ts error(7044) occurred.
It works as I expected when I downgrade the antd version to 5.15.4.
Through debugging, it was confirmed that this issue occurs because the RecordType = any statement was added to the TableProps of rc-table(v7.45) starting from antd version 5.16.0.
The text was updated successfully, but these errors were encountered: