@mjhls/mjh-framework 1.0.31 → 1.0.32
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/index.es.js +19 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -556,6 +556,7 @@ var DeckContent = function (_React$Component) {
|
|
|
556
556
|
|
|
557
557
|
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = DeckContent.__proto__ || Object.getPrototypeOf(DeckContent)).call.apply(_ref, [this].concat(args))), _this), _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
558
558
|
data: _this.data,
|
|
559
|
+
dataKeptToCompareNewDatarecord: _this.data,
|
|
559
560
|
per: _this.params ? _this.params.to : 2,
|
|
560
561
|
page: 1,
|
|
561
562
|
from: _this.params ? _this.params.from : 0,
|
|
@@ -684,6 +685,24 @@ var DeckContent = function (_React$Component) {
|
|
|
684
685
|
}
|
|
685
686
|
|
|
686
687
|
createClass(DeckContent, [{
|
|
688
|
+
key: 'componentDidUpdate',
|
|
689
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
690
|
+
if (this.state.dataKeptToCompareNewDatarecord !== this.props.dataRecord) {
|
|
691
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
692
|
+
this.setState({
|
|
693
|
+
data: this.props.dataRecord,
|
|
694
|
+
dataKeptToCompareNewDatarecord: this.props.dataRecord,
|
|
695
|
+
per: this.props.params ? this.props.params.to : 2,
|
|
696
|
+
page: 1,
|
|
697
|
+
from: this.props.params ? this.props.params.from : 0,
|
|
698
|
+
to: this.props.params ? this.props.params.to : 2,
|
|
699
|
+
total_pages: null,
|
|
700
|
+
scrolling: true,
|
|
701
|
+
query: this.props.query
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}, {
|
|
687
706
|
key: 'componentDidMount',
|
|
688
707
|
value: function componentDidMount() {
|
|
689
708
|
// this.loadData();
|