sg-item-list
v1.0.24
Published
Abstracted implementation of a react-virtualized autosizeing List
Downloads
6
Readme
sg-item-list
Abstracted implementation of a react-virtualized autosizeing List
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.