1.0.16 • Published 5 months ago

quite-simple-reactdatatable v1.0.16

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

Simple-ReactDataTable

Description

Simple React DataTable is a lightweight and flexible React component for displaying data in a tabular format. It offers pagination, search, and columnar sorting features, making the management of large data sets more accessible and intuitive.

Features

  • Pagination: Easily navigate through paginated data.
  • Search: Quickly search for specific data, including within a particular column.
  • Columnar Sorting: Sort data in a column in ascending or descending order.

Installation

To install the package, run the following command in your React project:

npm install simple-reactdatatable

Usage

How to use the ReactDataTable component in your application?

==> Importing:

import {ReactDataTable} from 'simple-reactdatatable';

==> Usage Example:

function MyComponent() {
    const data = [...]; // Your data array
    const columns = [...]; // Columns to display

    return <ReactDataTable data={data} columns={columns} />;
}

==> Props:

  • data (Array): Data to display in a table format. Must be an array of objects.

  • columns (Array): Table columns. Each object should contain a key and a title.

  • onRowClick (Function): Function called when a row is clicked. Receives the data object of the row.

  • defaultEntriesPerPage (Number): Number of entries to show per page. Default is 10.

  • sortColumnParam (String): Initial column key for sorting. Default is 'name'.

  • headerHeight, tableBodyHeight, paginationHeight (String): Custom height for different parts of the table. Default is 'auto'.

  • headerFontSize, tableBodyFontSize, paginationFontSize (String): Font size for the header, body, and pagination. Default is '1rem'.

  • fontFamily (String): Font family for the table text. Default is 'Arial'.

  • containerWidth (String): Width of the table container. Default is '100%'.

Dependencies

  • React
  • prop-types
  • Node.js (v20.8.1 or newer)

Recommended Development Environment

  • This package was made in Vscode.
1.0.16

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago