DEV Community

Cover image for TeaTable: Create Dynamic Crud Table Paginated Sorted Featured
Hakkı Cengiz
Hakkı Cengiz

Posted on • Updated on

TeaTable: Create Dynamic Crud Table Paginated Sorted Featured

TeaTable is a JavaScript library that allows you to quickly and easily create dynamic tables for your web applications. It supports CRUD operations, sorting, searching, full-screen viewing, export to CSV, and pagination.

Installation
npm i teatable

teatable

Features

  • Fully customizable, adding custom style.
  • CRUD Operations: Data insertion, reading, updating and deleting functions.
  • Sorting: Sorting by the relevant column when each column header is clicked.
  • Search: Instant search on table data.
  • Full Screen: View the table in full screen mode.
  • Export to CSV: Export table data in CSV format.
  • Paging: Page-by-page navigation for large data sets
  • Dark Mode
  • Multilanguage support

Usage

import TeaTable from 'teatable';

const options = {
    data: [ // data here
        { id: 1, name: "Örnek Veri 1", ekstra: "Ekstra Bilgi 1" },
        { id: 2, name: "Örnek Veri 2" }
    ],
    themeColor : "#6967ce",

    rowsPerPage: 5, // Opsiyonel: Sayfa başına satır sayısı (varsayılan: 5)
    // Opsiyonel: Callback fonksiyonları
    onCreate: (item) => { /* ... */ },
    onEdit: (item, index) => { /* ... */ },
    onDelete: (item, index) => { /* ... */ },
    // language support
    txtAdd     : "Add",
    txtUpdate  : "Update",
    txtDel     : "Delete",
    txtEdit    : "Edit",
    txtAct     : "Actions",
    txtSearch  : "Search...",
    txtPage    : "Page",
    txtConfirm : "Are you sure to delete this data?"
};

const myTable = new TeaTable('tableContainerId', options);
Enter fullscreen mode Exit fullscreen mode

dark mode teatable

Links

Don't hesitate to support with likes, comments and stars :)
Have a nice day!

Top comments (0)