fix: code review

This commit is contained in:
Zeke Zhang 2025-04-29 22:02:52 +08:00
parent 302b159010
commit e7de0607ce

View File

@ -949,6 +949,9 @@ export const Table: any = withDynamicSchemaProps(
const getRowKey = useCallback(
(record: any, index) => {
if (Array.isArray(rowKey)) {
if (rowKey.length === 1) {
return record[rowKey[0]];
}
return index;
} else if (typeof rowKey === 'string') {
return record[rowKey];