New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

reactjs-table-component

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactjs-table-component

Table component for react js to quick render data objects in table grid

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

reactjs-table-component

Table component for react js to quick render data objects in table grid

NPM JavaScript Style Guide

Install

npm install --save reactjs-table-component

Demo

Click for Demo

Usage

import React, { Component } from 'react'

import Table from 'reactjs-table-component'
import 'reactjs-table-component/dist/index.css'

class Example extends Component {
  render() {
    return <Table />
  }
}

API

NameTypeDefaultDescription
dataArray Array of objectsPlaceholder sample dataActual data to render in grid [{id:1,name:'ABC'},{id:2,name:'XYZ'}]
columnsArray or Array of Objects[] keys of data object will be uses if nullColumns to render in table (key should match data object keys) . Key Array ['id','name'] OR Object array for advanced control over table display properties [{key:'id',label:'Item ID',width: "40", align: "center" },{key:'name',width: "200"},{key:'Amount',width: "100", align:'right}] Object Keys: align:left,center,right [Default:left] width: Integer (Width of column)
tableClassStringtableCSS class name/names separated by space
captionString-Table caption
cellClassString-Table cell css class <td class="cellClass">
childrenDOM Object-Table body DOM object. Pass customized table body to render with custom layout <tr><td>value</td><td>Name<br/>Username</td><td><NewComponent/></td><td><button onClick={(e)=>someFunction(e)}></button></td></tr>
renderChildrenBooleanfalseRender children DOM
renderBodyBooleantrueRender default data grid body
noHeaderBooleantrueShow/Hide table header
headerCellCallbackFunction-Callback function to handle header cell click function(event){ // callback method }
cellCallbackFunction-Callback function to handle table body cell click function(event){ // callback method }

License

MIT © ktmcodelabs

Keywords

table

FAQs

Package last updated on 06 Jun 2021

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