trustgraph/src/model/node-properties-table.tsx
elpresidank a8390532f7 Squashed 'ai-context/workbench-ui/' content from commit 32e36a5c
git-subtree-dir: ai-context/workbench-ui
git-subtree-split: 32e36a5c2131e429a7081cfaf67dabad3193cda3
2026-04-05 21:08:02 -05:00

32 lines
995 B
TypeScript

import { createColumnHelper } from "@tanstack/react-table";
/**
* Node property data structure for the node properties table
* Represents a single property with its predicate label and value
*/
export type NodeProperty = {
property: string; // Human-readable property name (label)
value: string; // Property value
uri?: string; // Original property URI (optional, for reference)
};
// Create a column helper instance for type-safe column definitions
export const columnHelper = createColumnHelper<NodeProperty>();
/**
* Column definitions for the node properties table
* Defines how each column should be rendered and what data it displays
*/
export const columns = [
// Property column - displays the property name/label
columnHelper.accessor("property", {
header: "Property",
cell: (info) => info.getValue(),
}),
// Value column - displays the property value
columnHelper.accessor("value", {
header: "Value",
cell: (info) => info.getValue(),
}),
];