@quintype/components 3.5.1-csv-table.1 → 3.5.1-csv-table.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -3148,6 +3148,7 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
3148
3148
|
|
|
3149
3149
|
_classCallCheck__default["default"](this, Table);
|
|
3150
3150
|
|
|
3151
|
+
// props.data = {content: '', content-type: 'csv'}
|
|
3151
3152
|
_this = _super.call(this, props);
|
|
3152
3153
|
_this.state = {
|
|
3153
3154
|
tableData: []
|
|
@@ -3179,7 +3180,9 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
3179
3180
|
key: "componentDidMount",
|
|
3180
3181
|
value: function componentDidMount() {
|
|
3181
3182
|
this._isMounted = true;
|
|
3182
|
-
this.parseCSVToJson(this.props.data.content);
|
|
3183
|
+
this.parseCSVToJson(this.props.data.content); // csv string
|
|
3184
|
+
|
|
3185
|
+
console.log("aa--qc-tableData", this.state.tableData);
|
|
3183
3186
|
}
|
|
3184
3187
|
}, {
|
|
3185
3188
|
key: "componentWillUnmount",
|
|
@@ -3189,6 +3192,8 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
3189
3192
|
}, {
|
|
3190
3193
|
key: "componentWillReceiveProps",
|
|
3191
3194
|
value: function componentWillReceiveProps(nextProps) {
|
|
3195
|
+
console.log("aa--qc-nextProps", nextProps);
|
|
3196
|
+
|
|
3192
3197
|
if (this.props.data.content !== nextProps.data.content) {
|
|
3193
3198
|
this.parseCSVToJson(nextProps.data.content);
|
|
3194
3199
|
}
|
|
@@ -3196,6 +3201,8 @@ var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
3196
3201
|
}, {
|
|
3197
3202
|
key: "render",
|
|
3198
3203
|
value: function render() {
|
|
3204
|
+
console.log("aa--qc-tableLength", this.state.tableData.length);
|
|
3205
|
+
|
|
3199
3206
|
if (!this.state.tableData.length > 0) {
|
|
3200
3207
|
return null;
|
|
3201
3208
|
}
|
|
@@ -41,6 +41,7 @@ export var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
41
41
|
|
|
42
42
|
_classCallCheck(this, Table);
|
|
43
43
|
|
|
44
|
+
// props.data = {content: '', content-type: 'csv'}
|
|
44
45
|
_this = _super.call(this, props);
|
|
45
46
|
_this.state = {
|
|
46
47
|
tableData: []
|
|
@@ -72,7 +73,9 @@ export var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
72
73
|
key: "componentDidMount",
|
|
73
74
|
value: function componentDidMount() {
|
|
74
75
|
this._isMounted = true;
|
|
75
|
-
this.parseCSVToJson(this.props.data.content);
|
|
76
|
+
this.parseCSVToJson(this.props.data.content); // csv string
|
|
77
|
+
|
|
78
|
+
console.log("aa--qc-tableData", this.state.tableData);
|
|
76
79
|
}
|
|
77
80
|
}, {
|
|
78
81
|
key: "componentWillUnmount",
|
|
@@ -82,6 +85,8 @@ export var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
82
85
|
}, {
|
|
83
86
|
key: "componentWillReceiveProps",
|
|
84
87
|
value: function componentWillReceiveProps(nextProps) {
|
|
88
|
+
console.log("aa--qc-nextProps", nextProps);
|
|
89
|
+
|
|
85
90
|
if (this.props.data.content !== nextProps.data.content) {
|
|
86
91
|
this.parseCSVToJson(nextProps.data.content);
|
|
87
92
|
}
|
|
@@ -89,6 +94,8 @@ export var Table = /*#__PURE__*/function (_React$Component) {
|
|
|
89
94
|
}, {
|
|
90
95
|
key: "render",
|
|
91
96
|
value: function render() {
|
|
97
|
+
console.log("aa--qc-tableLength", this.state.tableData.length);
|
|
98
|
+
|
|
92
99
|
if (!this.state.tableData.length > 0) {
|
|
93
100
|
return null;
|
|
94
101
|
}
|