import type { MlBaseFormListProps, MlBaseFormListRow } from '../types'; export function safeGetRowKey( rowKeyField: MlBaseFormListProps['rowKeyField'], record: MlBaseFormListRow, rowIndex: number, ) { if (typeof rowKeyField === 'string') { return String(record[rowKeyField]); } else if (typeof rowKeyField === 'function') { return rowKeyField(record); } else { return String(rowIndex); } }