JSPM

ka-table2

12.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q12665F
  • License MIT

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ka-table2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    The customizable, extendable, lightweight, and fully free React Table Component

    GitHub license npm version Coverage Status

    Site | Demos | Docs

    Table Demo link

    Installation

    npm

    npm install ka-table

    yarn

    yarn add ka-table

    Usage

    Basic example

    import 'ka-table/style.css';
    
    import React from 'react';
    
    import { Table } from 'ka-table';
    import { DataType, EditingMode, SortingMode } from 'ka-table/enums';
    
    const dataArray = Array(10)
      .fill(undefined)
      .map((_, index) => ({
        column1: `column:1 row:${index}`,
        column2: `column:2 row:${index}`,
        column3: `column:3 row:${index}`,
        column4: `column:4 row:${index}`,
        id: index,
      }));
    
    const OverviewDemo = () => {
      return (
        <Table
          columns={[
            { key: 'column1', title: 'Column 1', dataType: DataType.String },
            { key: 'column2', title: 'Column 2', dataType: DataType.String },
            { key: 'column3', title: 'Column 3', dataType: DataType.String },
            { key: 'column4', title: 'Column 4', dataType: DataType.String },
          ]}
          data={dataArray}
          editingMode={EditingMode.Cell}
          rowKeyField={'id'}
          sortingMode={SortingMode.Single}
        />
      );
    };
    
    export default OverviewDemo;

    Example link