Add fault-tolerant processing for rowSelection.getCheckboxProps

This commit is contained in:
chenlong 2019-03-06 13:58:04 +08:00
parent 074363b514
commit fc88005c9c

View File

@ -153,7 +153,7 @@ export default class Table<T> extends React.Component<TableProps<T>, TableState<
const key = this.getRecordKey(item, index);
// Cache checkboxProps
if (!this.CheckboxPropsCache[key]) {
this.CheckboxPropsCache[key] = rowSelection.getCheckboxProps(item);
this.CheckboxPropsCache[key] = rowSelection.getCheckboxProps(item) || {};
}
return this.CheckboxPropsCache[key];
};