sg-item-list

1.0.24 • Public • Published

sg-item-list

Abstracted implementation of a react-virtualized autosizeing List

NPM JavaScript Style Guide

Install

npm install --save sg-item-list

Usage

import React, { Component } from 'react'
 
import ItemList from 'sg-item-list'
 
const items = ["item 1","item 2","item 3"];
 
class Example extends Component {
  constructor(props){
    super(props);
    this.renderRow = this.renderRow.bind(this);
  }
  
  renderRow(index, maximized, item, event) {
        return (
            <div>
                <div>Item number {index}</div>
                <div>
                item is the model of the data you want to render
                </div>
                <div>
                maximized tells if the row should be maximized
                </div>
                <div>
                event is the event to call if the edit button has been clicked
                </div>
            </div>
        );
    }
 
  render () {
    return (
      <ItemList list={items} itemRender={this.renderRow} />
    )
  }
}

Version Info

1.0.6

  • Added update property.

1.0.5

  • Added forceUpdate function.

1.0.4

  • Fixed css width issue.

1.0.3

  • Fixed css issue.

1.0.2

  • Nothing Major

1.0.1

  • Fixed issue where ItemList wasn't the default export.

1.0.0

Initial release.

License

MIT ©

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.24
    1
    • latest

Version History

Package Sidebar

Install

npm i sg-item-list

Weekly Downloads

2

Version

1.0.24

License

MIT

Unpacked Size

33.9 kB

Total Files

6

Last publish

Collaborators

  • phishfordead