Skip to content

Instantly share code, notes, and snippets.

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

  • Save AllenFang/4235cd022537a2b93eb99b58bd33e87e to your computer and use it in GitHub Desktop.

Select an option

Save AllenFang/4235cd022537a2b93eb99b58bd33e87e to your computer and use it in GitHub Desktop.
class CustomStyleNavTable extends React.Component {
customStyle = (cell, row) => {
return {
backgroundColor: 'red'
};
}
render() {
const keyBoardNav = {
customStyle: this.customStyle
};
return (
<BootstrapTable data={ products } 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