@frui.ts/dataviews
Advanced tools
Comparing version 0.15.0-rc.1 to 0.15.0-rc.2
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.15.0-rc.1", | ||
"version": "0.15.0-rc.2", | ||
"description": "View components for data display", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "94f63f6550f4893c2bbf0ca038560fb2f4b6f2aa" | ||
"gitHead": "c9efd19043d893e3d6d72f90f7429f778c02df22" | ||
} |
@@ -9,2 +9,29 @@ # `@frui.ts/dataViews` | ||
## Example | ||
```tsx | ||
// in your View | ||
import { ColumnDefinition, DataTable } from "@frui.ts/dataviews"; | ||
const tableColumns: ColumnDefinition<MyEntity, MyContext>[] = [ | ||
{ | ||
title: "id", | ||
property: "id", | ||
valueFormatter: x => `(${x.value})` | ||
}, | ||
{ | ||
titleFactory: (context) => {context.localize("name")}, | ||
property: "name", | ||
sortable: true, | ||
} | ||
]; | ||
... | ||
<DataTable items={vm.items} itemKey="id" columns={tableColumns} context={vm} /> | ||
``` | ||
You can check [ColumnDefinition](./src/dataTypes.ts) for more details. | ||
## Styles | ||
@@ -11,0 +38,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45347
43