mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 05:26:45 +00:00
12 lines
264 B
TypeScript
12 lines
264 B
TypeScript
import type { ColumnType } from 'nocodb-sdk'
|
|
|
|
export const extractPkFromRow = (row: Record<string, any>, columns: ColumnType[]) => {
|
|
return (
|
|
row &&
|
|
columns
|
|
?.filter((c) => c.pk)
|
|
.map((c) => row?.[c.title as string])
|
|
.join('___')
|
|
)
|
|
}
|