npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ocr-react-datatable

v1.7.23

Published

Package for datatable's creation (React)

Downloads

46

Readme

OCR-React-Datatable

OCR-React-Datatable is a React component that renders a sortable and paginated table. It can be customized with the headers and data that you provide.

Installation

You can install the package using npm:

npm install ocr-react-datatable

Usage

import ReactDataTable from 'ocr-react-datatable';

const data = [
  [1, 'John', 'Doe'],
  [2, 'Jane', 'Doe'],
  [3, 'Bob', 'Smith'],
  [4, 'Alice', 'Johnson'],
];

const headers = [
  { name: 'ID', type: 'number', isActive: false, sens: 1 },
  { name: 'First Name', type: 'string', isActive: false, sens: 1 },
  { name: 'Last Name', type: 'string', isActive: false, sens: 1 },
];

function App() {
  return (
    <div>
      <h1>OCR React Datatable</h1>
      <ReactDataTable data={data} headers={headers} />
    </div>
  );
}

export default App;

API

ReactDataTable

The ReactDataTable component takes in the following props:

data

Type: Array

An array of arrays containing the data to be displayed in the table.

headers

Type: Array

An array of objects representing the headers of the table. Each object should have a name, type, isActive, and sens property.

name: The name of the header type: The type of data in the column. Currently supported types are number, string, and boolean. isActive: Whether the column is currently being sorted by. sens: The direction to sort the column by. 1 for ascending and -1 for descending. debug Type: Boolean

A flag indicating whether to output debug information to the console.

Contributing

We welcome contributions to OCR React Datatable! To get started, clone the repository and install the dependencies:

git clone https://github.com/your-username/ocr-react-datatable.git
cd ocr-react-datatable
npm install

Then, you can run the tests with:

npm test

License

OCR React Datatable is licensed under the MIT License.