Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

neenhouse-react-grid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neenhouse-react-grid

ReactJS Grid

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

React Grid Build Status

ES6/7 Grid written in ReactJS

Required Dependencies

  • ReactJS 15.x

Browser

  • Can be accessed as global window.ReactGrid

Installation

npm install neenhouse-react-grid --save;

Demo

npm run demo

Basic Usage

import React from 'react';
import ReactDOM from 'react-dom';
import ReactGrid from 'react-grid';
ReactDOM.render(<ReactGrid {...options} />, document.body);

Default Options

// If set to true, renders a checkbox in the first column
bulkSelectionEnabled: [React.PropTypes.bool, false],

// Array of column definitions (required)
// Ex: [{
//			description: 'Name',
//			flex: 1,
//			sortColumn:'Name',
//      sortDirection:'ASC',
//      isDefault:true
//		}]
columnHeaders: [React.PropTypes.array, null],

// Function that is executed on callback when accessing count response
countAccessor: [React.PropTypes.func, function(response){ return response; }],

// Provide data directly to grid.  Use with "dataProvider" set to false.
data: [React.PropTypes.array, null],

// Function that is executed on callback when accessing data response
dataAccessor: [React.PropTypes.func, function(response){ return response; }],

// Callback function for table interactions
dispatch: [React.PropTypes.func, function(){}],

// Empty message to display to user
emptyMessage: [React.PropTypes.string, 'No records found.'],

// Number of items to show when loading data (defaults to 10)
numberOfLoadingItems: [React.PropTypes.number, 10],

// Provide pager state
pager: [React.PropTypes.object, {
  increments: [10, 20, 50, 100],
  index:1,
  items:20,
  total:0
}],

// Provide function for rendering expanded row
renderExpandedRow: [React.PropTypes.any, false],

// Provide row rendering function.  Takes "rowData" as first argument.
// EXAMPLE:
// renderRow:function(rowData){
//   return <span>{rowData.firstName}</span>;
// }
renderRow:[React.PropTypes.func.isRequired, null],

// If set to false, will allow multiple rows to be expanded
singleExpand: [React.PropTypes.bool, true],

// Prop keys that determine if component is re-rendered
updateProps: [React.PropTypes.array, ['pager', 'data']],

// If set to false, does not render column headers
useHeader: [React.PropTypes.bool, true],

// Sets usage mode of pager (supports true, false, and 'manual')
usePager: [React.PropTypes.any, true],

// Unique identifier for data table instance
idKey: [React.PropTypes.string, null]

FAQs

Package last updated on 11 May 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc