This is the preact component of the GuiExpert Table Project.
npm install @guiexpert/preact-tableThis is the preact component of the GuiExpert Table Project.
This is the UI-agnostic table component for your next web app. 😊

- Demos
- Documentation
- API
Add the following two NPM packages to your existing preact project (run this in your project root directory):
```
npm install --save @guiexpert/table @guiexpert/preact-table
Add GuiexpertTable component to a template:
``
return (
tableModel={tableModel}
mouseClicked={console.info}
tableReady={tableReady}
/>
);
Import the following classes in your component:
``
import { GuiexpertTable } from "@guiexpert/preact-table";
import {
GeMouseEvent,
TableApi
TableFactory,
TableModelIf,
TableOptions,
TableOptionsIf
} from "@guiexpert/table";
Add a tableModel property and a onTableReady method to the component:
`
const tableModel: TableModelIf = TableFactory.createTableModel({
headerData: [
['Header 1', 'Header 2']
],
bodyData: [
['Text 1a', 'Text 2a'],
['Text 1b', 'Text 2b'],
]
});
const tableOptions = new TableOptions();
function onTableReady(api: TableApi) {
console.info("onTableReady API:", api);
}
``
There are numerous possibilities to create table models.
Please refer to the Documentation for further information or the Demo section for examples.