@pdg/react-table 1.0.16 → 1.0.17
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.esm.js +5 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8850,21 +8850,22 @@ var Table = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
8850
8850
|
}
|
|
8851
8851
|
}, [initStyle, fullHeight]);
|
|
8852
8852
|
var simpleBarStyle = React.useMemo(function () {
|
|
8853
|
+
var finalPagingHeight = paging && paging.total > 0 ? pagingHeight : undefined;
|
|
8853
8854
|
if (fullHeight) {
|
|
8854
8855
|
return {
|
|
8855
|
-
height: (containerHeight || 0) - (
|
|
8856
|
+
height: (containerHeight || 0) - (finalPagingHeight || 0) - 2,
|
|
8856
8857
|
flex: 1,
|
|
8857
8858
|
position: 'absolute',
|
|
8858
8859
|
top: 1,
|
|
8859
8860
|
left: 0,
|
|
8860
8861
|
right: 0,
|
|
8861
|
-
marginBottom:
|
|
8862
|
+
marginBottom: finalPagingHeight || 0,
|
|
8862
8863
|
};
|
|
8863
8864
|
}
|
|
8864
8865
|
else {
|
|
8865
8866
|
return { height: height, minHeight: minHeight, maxHeight: maxHeight, marginBottom: -1 };
|
|
8866
8867
|
}
|
|
8867
|
-
}, [containerHeight, fullHeight, height, maxHeight, minHeight, pagingHeight]);
|
|
8868
|
+
}, [paging, containerHeight, fullHeight, height, maxHeight, minHeight, pagingHeight]);
|
|
8868
8869
|
var pagingStyle = React.useMemo(function () {
|
|
8869
8870
|
var style = { padding: '13px 0', borderTop: '1px solid rgba(224, 224, 224, 1)' };
|
|
8870
8871
|
if (fullHeight) {
|
|
@@ -8886,7 +8887,7 @@ var Table = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
8886
8887
|
React__default["default"].createElement("div", null, "\uAC80\uC0C9\uB41C \uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."))))))) : undefined),
|
|
8887
8888
|
footer && (React__default["default"].createElement(material.TableFooter, null,
|
|
8888
8889
|
React__default["default"].createElement(material.TableRow, null, finalColumns.map(function (column, idx) { return (React__default["default"].createElement(TableFooterCell, { key: idx, column: column, defaultAlign: defaultAlign })); }))))))),
|
|
8889
|
-
paging && (React__default["default"].createElement(material.Stack, { ref: fullHeight ? pagingHeightResizeDetector : undefined, alignItems: pagingAlign, style: pagingStyle },
|
|
8890
|
+
paging && paging.total > 0 && (React__default["default"].createElement(material.Stack, { ref: fullHeight ? pagingHeightResizeDetector : undefined, alignItems: pagingAlign, style: pagingStyle },
|
|
8890
8891
|
React__default["default"].createElement(TablePagination, { className: pagination === null || pagination === void 0 ? void 0 : pagination.className, style: pagination === null || pagination === void 0 ? void 0 : pagination.style, sx: pagination === null || pagination === void 0 ? void 0 : pagination.sx, paging: paging, align: pagingAlign, onChange: onPageChange }))))) : null;
|
|
8891
8892
|
});
|
|
8892
8893
|
Table.displayName = 'Table';
|