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

react-jquery-data-table

v1.0.0

Published

Welcome to DataTableReact, your ultimate solution for integrating jQuery DataTable-like functionality into React components! With DataTableReact, effortlessly enhance your React applications with dynamic and responsive data tables. Harness a rich array of

Downloads

19

Readme

react-jquery-data-table

Welcome to DataTableReact, your ultimate solution for integrating jQuery DataTable-like functionality into React components! With DataTableReact, effortlessly enhance your React applications with dynamic and responsive data tables. Harness a rich array of customizable options, empowering you to efficiently manage and visualize data within your projects. Seamlessly integrate DataTableReact into your workflow for streamlined data presentation and enhanced user experience.

Installation

$ npm install --save react-jquery-data-table
$ yarn add react-jquery-data-table

$ import {
  DataTable,
} from "react-jquery-data-table";

Features

  • Dynamic Data Rendering: Render dynamic data tables with ease, supporting a variety of data sources and formats.
  • Customizable Columns: Define and customize columns to suit your data presentation needs, including sorting, filtering, and formatting options.
  • Pagination: Enable pagination to efficiently navigate through large datasets, with customizable page sizes and page indicators.
  • Search and Filtering: Implement search and filtering functionality to quickly locate and narrow down specific data entries.
  • Responsive Design: Ensure optimal viewing experience across devices with responsive design that adapts to different screen sizes.
  • Integration with React Applications: Seamlessly integrate DataTableReact into your existing React applications without any hassle.
  • Extensible and Configurable: Configure DataTableReact to meet your specific requirements and extend its functionality with ease.
  • Performance Optimization: Optimize performance for large datasets with efficient rendering and data handling mechanisms.
  • Theming and Styling: Customize the look and feel of your data tables with flexible theming and styling options.
  • Cross-Browser Compatibility: Support a wide range of modern browsers for consistent behavior and performance.

The gist

Default

import React, { useEffect, useState } from "react";
import { DataTable } from "react-jquery-data-table";
import "bootstrap/dist/css/bootstrap.min.css";
import { GetCountries } from "react-country-state-city";
export default function App() {
  const [countries, setCountries] = useState([]);
  useEffect(() => {
    GetCountries().then((res) => {
      setCountries(res);
    });
  }, []);
  return (
    <DataTable
      title="Countries"
      data={countries}
      heads={[
        { name: "Name", fieldname: "name" },
        { name: "Capital", fieldname: "capital" },
        { name: "Currency", fieldname: "currency" },
        { name: "Currency Symbol", fieldname: "currency_symbol" },
        { name: "Native", fieldname: "native" },
        { name: "Region", fieldname: "region" },
        {
          name: "Name With Custom View",
          fieldname: "",
          view: (item) => <h5>{item.name}</h5>,
        },
      ]}
    />
  );
}

Data Table Example

The Data Table Properties

Properties used to customise the rendering:

| Name | Type | Description | | ------------------ | -------- | --------------------------------------------------------------------------------------- | | title | string | The title for the table | | heads | HeadProps | Head text for the table head and field name to fetched from data and display in | | data | Array | Data records for the table | | currentPage | number | optional Current page in pagination | | itemsperpage | number | optional The number of items you want per page default is 10. | | hasItemsPerPageDropdown | boolean | optional Items per page change dropdown are displayed when true and not displayed when false. default is true. | | hasPagination | boolean | optional Bottom pagination buttons are displayed when true and not displayed when false. default is true. | | searchEnabled | boolean | optional Search box are displayed when true and not displayed when false. default is true. |

HeadProps Properties

The same country select properties and additionally

| Name | Type | Description | | --------- | ------ | ------------------------------------------------ | | name | string | required Title of the table head | | fieldname | string | required Which field of object need to be displayed from data array to | | view | FC | optional Custom component to display fieldname |

Demo

A demo is worth a thousand words

Contribute

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! [email protected]

License

Licensed under MIT