add table util
authorHongyuan Ma <CS_MaleicAcid@163.com>
Wed, 23 May 2018 13:54:10 +0000 (21:54 +0800)
committerHongyuan Ma <CS_MaleicAcid@163.com>
Wed, 23 May 2018 13:54:10 +0000 (21:54 +0800)
front-end/src/util/table-list/index.jsx [new file with mode: 0644]

diff --git a/front-end/src/util/table-list/index.jsx b/front-end/src/util/table-list/index.jsx
new file mode 100644 (file)
index 0000000..4ff4b99
--- /dev/null
@@ -0,0 +1,30 @@
+import React from 'react';
+
+// general table
+class TableList extends React.Component{
+    constructor(props){
+        super(props);
+        this.state = {
+            isFirstLoading: true
+        }
+    }
+    componentWillReceiveProps(){
+        // Only when the table is loaded for the first time,isFirstLoading equals true
+        this.setState({
+            isFirstLoading : false
+        });
+    }
+    render(){
+        return (
+            <div className="row">
+                <div className="col-md-12">
+                    <table className="table">
+                    {/*todo*/}
+                    </table>
+                </div>
+            </div>
+        );
+    }
+}
+
+export default TableList;
\ No newline at end of file