View as Markdown

API reference: @salmonui/data-grid/engine

rowIdFromKeyfunction

import { rowIdFromKey } from '@salmonui/data-grid/engine';
function rowIdFromKey<Row>(key: string | readonly string[] | ((row: Row) => RowId | number)): (row: Row) => RowId;

Builds a getRowId from a primary key: a field name, several field names (joined with \u001f), or a function. The React DataGrid uses it for primaryKey columns.