Skip to content
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

antd table bug: rowSelection config type can't apply #19239

Closed
1 task
zhaoPengInGithub opened this issue Oct 16, 2019 · 2 comments
Closed
1 task

antd table bug: rowSelection config type can't apply #19239

zhaoPengInGithub opened this issue Oct 16, 2019 · 2 comments
Assignees

Comments

@zhaoPengInGithub
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://localhost

Steps to reproduce

const rowSelection = {
      type: "radio",
      selectedRowKeys,
      onChange: this.onSelectChange
}
<Table<TrainingDataColumn> scroll={{y: 290}} bordered={true} rowSelection={rowSelection} columns={this.columns} dataSource={formListData} />

What is expected?

table behavior normal and radio works right,not checkbox

What is actually happening?

Type '{ type: string; selectedRowKeys: number[]; onChange: (selectedRowKeys: any) => void; }' is not assignable to type 'TableRowSelection'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type '"radio" | "checkbox" | undefined'. TS2322

Environment Info
antd 3.23.3
React 16.9.0
System mac OS mojave
Browser chrome newest
@afc163
Copy link
Member

afc163 commented Oct 16, 2019

-      type: "radio",
+      type: "radio" as "radio",

@zhaoPengInGithub
Copy link
Author

-      type: "radio",
+      type: "radio" as "radio",

@afc163 done! but I don't know why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants