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

neenhouse-react-grid

v1.0.1

Published

ReactJS Grid

Downloads

8

Readme

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]