Created
April 30, 2017 06:47
-
-
Save AllenFang/a8805f699366d3e51f721607b2ce526f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jobs = []; | |
const jobTypes = [ 'A', 'B', 'C', 'D' ]; | |
const cellEditProp = { | |
mode: 'click', | |
blurToSave: true | |
}; | |
export default class EditTypeReadOnlyTable extends React.Component { | |
render() { | |
return ( | |
<BootstrapTable data={ jobs } cellEdit={ cellEditProp } insertRow={ true }> | |
<TableHeaderColumn dataField='id' isKey={ true }>Job ID</TableHeaderColumn> | |
<TableHeaderColumn dataField='status'>Job Status</TableHeaderColumn> | |
<TableHeaderColumn dataField='name' editable={ { type: 'textarea', readOnly: true } }>Job Name</TableHeaderColumn> | |
<TableHeaderColumn dataField='type' editable={ { type: 'select', readOnly: true, options: { values: jobTypes } } }>Job Type</TableHeaderColumn> | |
<TableHeaderColumn dataField='active' editable={ { type: 'checkbox', readOnly: true, options: { values: 'Y:N' } } }>Active</TableHeaderColumn> | |
</BootstrapTable> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment