0.1.7 • Published 4 months ago

primitive-table v0.1.7

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Primitive Table

sample table

This is a simple package for react table.

Installation

  • NPM
npm i primitive-table
  • yarn
yarn add primitive-table

Ex usage:

import { InitRecordType, Table, TableColumn } from "primitive-table";

interface RecordType extends InitRecordType {
  name: string;
  age: number;
}

const columns: TableColumn<RecordType>[] = [
  {
    label: "Name",
    fnDataIndex: (item) => item.name,
  },
  {
    label: "Age",
    fnDataIndex: (item) => item.age,
  },
];

const records: RecordType[] = [
  {
    name: "budi",
    age: 18,
    key: "1",
  },
  {
    name: "santoso",
    age: 18,
    key: "2",
  },
];

Then it could be called like this:

<Table columns={columns} tableId="sample" dataSource={records} />
0.1.7

4 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.4

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.1.0

4 months ago