Skip to content

Instantly share code, notes, and snippets.

@AllenFang
Created February 16, 2017 15:30
Show Gist options
  • Select an option

  • Save AllenFang/6a83dd3e565dbcac947e653bc1516f1b to your computer and use it in GitHub Desktop.

Select an option

Save AllenFang/6a83dd3e565dbcac947e653bc1516f1b to your computer and use it in GitHub Desktop.
class CellEditWithNavWithoutStyleTable extends React.Component {
customStyle = (cell, row) => {
return {
backgroundColor: 'red'
};
}
render() {
const cellEdit = {
mode: 'click',
blurToSave: true
};
const keyBoardNav = {
customStyleOnEditCell: this.customStyle
};
return (
<BootstrapTable data={ products } cellEdit={ cellEdit } keyBoardNav={ keyBoardNav }>
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment