Antd design table dynamically changes the rowSelection problem

problem description

problems with dynamically changing rowSelection

the environmental background of the problems and what methods you have tried

In

3 cases, the official type is checkbox | radio, but there are cases where it is not needed. Dynamic changes, such as encapsulation, some are needed and some are not. If false, is passed, it will give warning (Failed prop type: Invalid prop rowSelection of type boolean supplied to Table , expected object )

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)
< Table

rowKey={reportType === 1 ? "userId":"paymentOrder"}
columns={reportType === 1 ? this.columns : columns}
dataSource={dataSouce.rows}
rowSelection={reportType === 1 ? this.rowSelection : false}

/ >

what result do you expect? What is the error message actually seen?

how to implement false without error

Feb.14,2022

Why not try undefined

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf2d61-315af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf2d61-315af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?