소스 검색

WIP: impl HandsontableModal

Yuki Takei 7 년 전
부모
커밋
9c56b88625
1개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 9 9
      src/client/js/components/PageEditor/HandsontableModal.jsx

+ 9 - 9
src/client/js/components/PageEditor/HandsontableModal.jsx

@@ -30,15 +30,6 @@ export default class HandsontableModal extends React.Component {
     this.cancel = this.cancel.bind(this);
   }
 
-  show(data, doneHandler) {
-    this.initData(data);
-    this.setState({ show: true });
-  }
-
-  cancel() {
-    this.setState({ show: false });
-  }
-
   initData(data) {
     const initData = data || [
       ['col1', 'col2', 'col3'],
@@ -48,6 +39,15 @@ export default class HandsontableModal extends React.Component {
     this.setState({ data: initData });
   }
 
+  show(data, doneHandler) {
+    this.initData(data);
+    this.setState({ show: true });
+  }
+
+  cancel() {
+    this.setState({ show: false });
+  }
+
   render() {
     return (
       <Modal show={this.state.show} onHide={this.cancel} bsSize="large">