@salesgenterp/ui-components 0.4.531 → 0.4.532
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.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7762,6 +7762,7 @@ function EnhancedTable(_ref2) {
|
|
|
7762
7762
|
var _React$useState6 = React.useState(DEFAULT_PAGE_SIZE),
|
|
7763
7763
|
rowsPerPage = _React$useState6[0],
|
|
7764
7764
|
setRowsPerPage = _React$useState6[1];
|
|
7765
|
+
var tableContainerRef = React.useRef(null);
|
|
7765
7766
|
var NUMERIC_SORT_COLUMNS = ['quantity', 'standardPrice', 'subtotal'];
|
|
7766
7767
|
var handleRequestSort = function handleRequestSort(event, property) {
|
|
7767
7768
|
var isSameColumn = orderBy === property;
|
|
@@ -7830,6 +7831,13 @@ function EnhancedTable(_ref2) {
|
|
|
7830
7831
|
setPage(1);
|
|
7831
7832
|
}
|
|
7832
7833
|
}, [totalPages, page]);
|
|
7834
|
+
React.useEffect(function () {
|
|
7835
|
+
var _tableContainerRef$cu, _tableContainerRef$cu2;
|
|
7836
|
+
(_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : (_tableContainerRef$cu2 = _tableContainerRef$cu.scrollTo) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.call(_tableContainerRef$cu, {
|
|
7837
|
+
top: 0,
|
|
7838
|
+
behavior: 'smooth'
|
|
7839
|
+
});
|
|
7840
|
+
}, [page, rowsPerPage]);
|
|
7833
7841
|
return /*#__PURE__*/React.createElement(CartPageBox, null, loading && /*#__PURE__*/React.createElement(Loader$1, null, /*#__PURE__*/React.createElement(reactSpinners.BounceLoader, {
|
|
7834
7842
|
size: 40,
|
|
7835
7843
|
color: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
|
|
@@ -7839,6 +7847,7 @@ function EnhancedTable(_ref2) {
|
|
|
7839
7847
|
width: '100%'
|
|
7840
7848
|
}
|
|
7841
7849
|
}, /*#__PURE__*/React.createElement(CartTableContainer, {
|
|
7850
|
+
ref: tableContainerRef,
|
|
7842
7851
|
bg: styles === null || styles === void 0 ? void 0 : (_styles$scroll = styles.scroll) === null || _styles$scroll === void 0 ? void 0 : _styles$scroll.bg,
|
|
7843
7852
|
color: styles === null || styles === void 0 ? void 0 : (_styles$scroll2 = styles.scroll) === null || _styles$scroll2 === void 0 ? void 0 : _styles$scroll2.color
|
|
7844
7853
|
}, /*#__PURE__*/React.createElement(Table, {
|