import React from 'react'; import PropTypes from 'prop-types'; import { Modal, ModalHeader, ModalBody, ModalFooter, } from 'reactstrap'; export default class GridEditModal extends React.PureComponent { constructor(props) { super(props); this.state = { show: false, }; this.show = this.show.bind(this); this.hide = this.hide.bind(this); this.cancel = this.cancel.bind(this); this.pasteCodedGrid = this.pasteCodedGrid.bind(this); } show() { this.setState({ show: true }); } hide() { this.setState({ show: false }); } cancel() { this.hide(); } pasteCodedGrid() { // dummy data const pasteCode = `
`; if (this.props.onSave != null) { console.log('hoge'); this.props.onSave(pasteCode); } this.cancel(); return pasteCode; } render() { return ( Edit Grid
); } } GridEditModal.propTypes = { onSave: PropTypes.func, };