Skip to content

Instantly share code, notes, and snippets.

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

  • Save AllenFang/3c64329e2ae3e8316f4d187f455762fa to your computer and use it in GitHub Desktop.

Select an option

Save AllenFang/3c64329e2ae3e8316f4d187f455762fa to your computer and use it in GitHub Desktop.
class EnterToEditWithNavTable extends React.Component {
render() {
const cellEdit = {
mode: 'click',
blurToSave: true
};
const keyBoardNav = {
enterToEdit: true
};
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