简体   繁体   English

ANT设计组件,如何在Table组件内部而不是复选框中使用Radio?

[英]ANT Design Component, how to use Radio inside Table component instead of the checkbox?

我的表格带有Antd的默认复选框选择

Using Ant Design components, i want to use Radio instead of the default checkbox provided in Table component with the rowSelection. 使用Ant Design组件,我想使用Radio而不是Table组件中带有rowSelection的默认复选框。

Can I do that? 我可以那样做吗? Or if i can't how do i make it so the user cannot select multiple rows? 或者,如果我无法做到这一点,那么用户将无法选择多行? (Only 1 checkbox can be checked) (只能选中1个复选框)

Change rowSelection.type to radio (default is checkbox ) rowSelection.type更改为radio (默认为checkbox

<Table rowSelection={{ type: 'radio' }} ... />

Demo 演示版

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM