mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: code review
This commit is contained in:
parent
302b159010
commit
e7de0607ce
@ -949,6 +949,9 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
const getRowKey = useCallback(
|
const getRowKey = useCallback(
|
||||||
(record: any, index) => {
|
(record: any, index) => {
|
||||||
if (Array.isArray(rowKey)) {
|
if (Array.isArray(rowKey)) {
|
||||||
|
if (rowKey.length === 1) {
|
||||||
|
return record[rowKey[0]];
|
||||||
|
}
|
||||||
return index;
|
return index;
|
||||||
} else if (typeof rowKey === 'string') {
|
} else if (typeof rowKey === 'string') {
|
||||||
return record[rowKey];
|
return record[rowKey];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user