This file contains hidden or 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
| class CustomInsertModal extends React.Component { | |
| handleSaveBtnClick = () => { | |
| const { columns, onSave } = this.props; | |
| const newRow = {}; | |
| columns.forEach((column, i) => { | |
| newRow[column.field] = this.refs[column.field].value; | |
| }, this); | |
| // You should call onSave function and give the new row | |
| onSave(newRow); |
This file contains hidden or 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
| class MyCustomBody extends React.Component { | |
| getFieldValue() { | |
| const newRow = {}; | |
| this.props.columns.forEach((column, i) => { | |
| newRow[column.field] = this.refs[column.field].value; | |
| }, this); | |
| return newRow; | |
| } |
This file contains hidden or 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
| class FullyCustomInsertModalHeaderTable extends React.Component { | |
| createCustomModalHeader(onClose, onSave) { | |
| const headerStyle = { | |
| fontWeight: 'bold', | |
| fontSize: 'large', | |
| textAlign: 'center', | |
| backgroundColor: '#eeeeee' | |
| }; | |
| return ( |