1.0.3 • Published 7 months ago

sortable-table-react v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Sortable-table-react

A React component for displaying a sortable and pageable table with controls

JavaScript React

Features description :

  • Sort the table columns.
  • Select the number of data to display (interacts with pagination).
  • Filter table data via the search bar.
  • Dynamically display the number of entries shown in the table.
  • Paginate the data displayed in the table.


Prerequisites

NodeJS : (v16.15.0 or later) Npm : (v7.24.0 or later) / Yarn : (v1.22.18 or later)



Installation

Install with NPM

npm install sortable-table-react

Install with YARN

yarn add sortable-table-react


Usage/Examples

import { SortableTable } from "sortable-table-react";

const tableHeads = [
	"First Name",
	"Last Name",
	"Start Date",
	"Department",
	"Date of Birth",
	"Street",
	"City",
	"State",
	"Zip Code",
];

const data = [
	{
		id: 1,
		firstName: "Deirdre",
		lastName: "Blackaller",
		department: "Human Resources",
		startDate: "08/27/2008",
		dateOfBirth: "11/27/1978",
		street: "16 Cottonwood Junction",
		city: "Alpharetta",
		state: "Georgia",
		zipCode: "30022",
	},
];

const App = () => {
	return <SortableTable data={data} tableHeads={tableHeads} />;
};

export default App;

- Props

NameTypeDescription
dataRequired - array of objectsData to display in the table
tableHeadsRequired - array of stringList of table headers


License

MIT

1.0.3

7 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago