useCurrentRow
Hook used to return the currently selected record in a data object
Example
import { useCurrentRow } from "@olenbetong/appframe-data";
function MyComponent() {
let record = useCurrentRow(dsMyDataObject);
return (
<p>
{record.ID}: {record.Title}
</p>
);
}import { useCurrentRow } from "@olenbetong/appframe-data";
function MyComponent({ id }: { id: number }) {
let record = useCurrentRow(dsMyDataObject, { filter: `[ID] = ${id}` });
return (
<p>
{record.ID}: {record.Title}
</p>
);
}API
Last updated
Was this helpful?