You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

table-listing

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

table-listing

Reusable React library for displaying tabular data with filtering, pagination, and search functionality

1.4.2
latest
Source
npmnpm
Version published
Weekly downloads
3
-89.29%
Maintainers
1
Weekly downloads
 
Created
Source

table-listing

Library to render a table, from a list of objects.

NPM JavaScript Style Guide

Install

npm install --save table-listing

Usage

Available props

  • listTitle (String): The title of your table.

  • listTitles (Array of Objects): The title of each column in your table, the corresponding label in your listElements, and the type of the information. (Currently supported : string, date and number)

  • listElements (Array of Objects): A list of objects where each object represents a row in the table. The properties of each object should always be the same, in the same order, and their values represent the data for each cell in the table.

Example:

import TableListing from 'table-listing'

const listTitle = "Class 3 students"
const listTitles = [
  {
    "label": "First Name", 
    "elementLabel": "name", 
    "type": "string"
  }, 
  {
    "label": "Age", 
    "elementLabel": "age", 
    "type": "number"
  }
]
const listElements = [
  {
    "name": "John",
    "age": 12
  }, 
  {
    "name": "Elisa",
    "age": 13
  }
]

function Example() {
  return (
    <>
      <TableListing listTitle={listTitle} listTitles={listTitles} listElements={listElements}/>
    </>
  );
}

License

MIT © Jendoki

FAQs

Package last updated on 17 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts