@bchr/bchr-front-lib 0.4.1 → 0.4.3
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/README.md
CHANGED
|
@@ -553,6 +553,10 @@ var GridForBrowse = /*#__PURE__*/function (_React$Component) {
|
|
|
553
553
|
}, {
|
|
554
554
|
key: "buildCell",
|
|
555
555
|
value: function buildCell(config, props) {
|
|
556
|
+
if (!this.gridRef.current) {
|
|
557
|
+
return /*#__PURE__*/_react["default"].createElement("td", null);
|
|
558
|
+
}
|
|
559
|
+
|
|
556
560
|
var allColumns = this.gridRef.current.columns;
|
|
557
561
|
var dataItem = props.dataItem,
|
|
558
562
|
columnIndex = props.columnIndex;
|
|
@@ -94,7 +94,7 @@ var Page = /*#__PURE__*/function (_React$Component) {
|
|
|
94
94
|
_createClass(Page, [{
|
|
95
95
|
key: "componentDidMount",
|
|
96
96
|
value: function componentDidMount() {
|
|
97
|
-
this.pageRef = this.pageRef
|
|
97
|
+
this.pageRef = this.refs.pageRef;
|
|
98
98
|
}
|
|
99
99
|
}, {
|
|
100
100
|
key: "render",
|
|
@@ -103,35 +103,35 @@ var Page = /*#__PURE__*/function (_React$Component) {
|
|
|
103
103
|
|
|
104
104
|
if (this.props.page_type === 'start_page_view') {
|
|
105
105
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_StartPageView["default"], _extends({
|
|
106
|
-
ref:
|
|
106
|
+
ref: "pageRef"
|
|
107
107
|
}, this.props));
|
|
108
108
|
} else if (this.props.page_type === 'default_list_view') {
|
|
109
109
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_DefaultListView["default"], _extends({
|
|
110
|
-
ref:
|
|
110
|
+
ref: "pageRef"
|
|
111
111
|
}, this.props));
|
|
112
112
|
} else if (this.props.page_type === 'left_right_view') {
|
|
113
113
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_LeftRightView["default"], _extends({
|
|
114
|
-
ref:
|
|
114
|
+
ref: "pageRef"
|
|
115
115
|
}, this.props));
|
|
116
116
|
} else if (this.props.page_type === 'custom_list_view') {
|
|
117
117
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_CustomListView["default"], _extends({
|
|
118
|
-
ref:
|
|
118
|
+
ref: "pageRef"
|
|
119
119
|
}, this.props));
|
|
120
120
|
} else if (this.props.page_type === 'custom_left_right_view') {
|
|
121
121
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_CustomLeftRightView["default"], _extends({
|
|
122
|
-
ref:
|
|
122
|
+
ref: "pageRef"
|
|
123
123
|
}, this.props));
|
|
124
124
|
} else if (this.props.page_type === 'default_card_view') {
|
|
125
125
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_DefaultCardView["default"], _extends({
|
|
126
|
-
ref:
|
|
126
|
+
ref: "pageRef"
|
|
127
127
|
}, this.props));
|
|
128
128
|
} else if (this.props.page_type === 'default_fluid_card_view') {
|
|
129
129
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_DefaultFluidCardView["default"], _extends({
|
|
130
|
-
ref:
|
|
130
|
+
ref: "pageRef"
|
|
131
131
|
}, this.props));
|
|
132
132
|
} else if (this.props.page_type === 'affix_fluid_card_view') {
|
|
133
133
|
pageContainer = /*#__PURE__*/_react["default"].createElement(_AffixFluidCardView["default"], _extends({
|
|
134
|
-
ref:
|
|
134
|
+
ref: "pageRef"
|
|
135
135
|
}, this.props));
|
|
136
136
|
}
|
|
137
137
|
|
package/package.json
CHANGED
|
@@ -294,6 +294,10 @@ class GridForBrowse extends React.Component{
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
buildCell(config, props) {
|
|
297
|
+
if (!this.gridRef.current) {
|
|
298
|
+
return <td></td>;
|
|
299
|
+
}
|
|
300
|
+
|
|
297
301
|
let allColumns = this.gridRef.current.columns;
|
|
298
302
|
let {dataItem, columnIndex} = props;
|
|
299
303
|
let {default_locked_fields, customCells, grid_info_record_of_data_check} = this.props;
|
|
@@ -15,7 +15,7 @@ class Page extends React.Component {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
componentDidMount() {
|
|
18
|
-
this.pageRef = this.pageRef
|
|
18
|
+
this.pageRef = this.refs.pageRef
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
showLoading = (state) => {
|
|
@@ -42,21 +42,21 @@ class Page extends React.Component {
|
|
|
42
42
|
let pageContainer = "";
|
|
43
43
|
|
|
44
44
|
if (this.props.page_type === 'start_page_view') {
|
|
45
|
-
pageContainer = <StartPageView ref=
|
|
45
|
+
pageContainer = <StartPageView ref="pageRef" {...this.props}/>;
|
|
46
46
|
} else if (this.props.page_type === 'default_list_view') {
|
|
47
|
-
pageContainer = <DefaultListView ref=
|
|
47
|
+
pageContainer = <DefaultListView ref="pageRef" {...this.props}/>;
|
|
48
48
|
} else if (this.props.page_type === 'left_right_view') {
|
|
49
|
-
pageContainer = <LeftRightView ref=
|
|
49
|
+
pageContainer = <LeftRightView ref="pageRef" {...this.props}/>;
|
|
50
50
|
} else if (this.props.page_type === 'custom_list_view') {
|
|
51
|
-
pageContainer = <CustomListView ref=
|
|
51
|
+
pageContainer = <CustomListView ref="pageRef" {...this.props}/>;
|
|
52
52
|
} else if (this.props.page_type === 'custom_left_right_view') {
|
|
53
|
-
pageContainer = <CustomLeftRightView ref=
|
|
53
|
+
pageContainer = <CustomLeftRightView ref="pageRef" {...this.props}/>;
|
|
54
54
|
} else if (this.props.page_type === 'default_card_view') {
|
|
55
|
-
pageContainer = <DefaultCardView ref=
|
|
55
|
+
pageContainer = <DefaultCardView ref="pageRef" {...this.props}/>;
|
|
56
56
|
} else if (this.props.page_type === 'default_fluid_card_view') {
|
|
57
|
-
pageContainer = <DefaultFluidCardView ref=
|
|
57
|
+
pageContainer = <DefaultFluidCardView ref="pageRef" {...this.props}/>;
|
|
58
58
|
} else if (this.props.page_type === 'affix_fluid_card_view') {
|
|
59
|
-
pageContainer = <AffixFluidCardView ref=
|
|
59
|
+
pageContainer = <AffixFluidCardView ref="pageRef" {...this.props}/>;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
return pageContainer
|