Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. return <Row style={styles.row} key={idx} item={item} onSelect={this.props.onRowSelect}>
  2. {columns.map((col, idx) => {
  3. return <Column style={col.style} key={`${item._id}_${col.key}`}
  4. width={col.width || this._defaultCellWidth} type={col.type}>
  5. {_.get(item, col.key)}
  6. </Column>
  7. })}
  8. </Row>
  9.  
  10. if(action.id) {
  11. let index = state.items.findIndex(item => item._id == action.id);
  12.  
  13. state.items[index].selected = action.selected;
  14. }else{
  15. state.items.map(e=>e.selected = action.selected);
  16. }
  17.  
  18. return {
  19. ...state,
  20. items: state.items
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement