tabler-react-2 0.1.128 → 0.1.130
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/table/index.js +14 -4
- package/docs/src/docs/changelog.mdx +4 -0
- package/package.json +1 -1
package/dist/table/index.js
CHANGED
|
@@ -121,7 +121,11 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
121
121
|
_ref4$defaultRowsPerP = _ref4.defaultRowsPerPage,
|
|
122
122
|
defaultRowsPerPage = _ref4$defaultRowsPerP === void 0 ? 10 : _ref4$defaultRowsPerP,
|
|
123
123
|
_ref4$tableClassName = _ref4.tableClassName,
|
|
124
|
-
tableClassName = _ref4$tableClassName === void 0 ? "" : _ref4$tableClassName
|
|
124
|
+
tableClassName = _ref4$tableClassName === void 0 ? "" : _ref4$tableClassName,
|
|
125
|
+
_ref4$paginationClass = _ref4.paginationClassName,
|
|
126
|
+
paginationClassName = _ref4$paginationClass === void 0 ? "" : _ref4$paginationClass,
|
|
127
|
+
_ref4$parentClassName = _ref4.parentClassName,
|
|
128
|
+
parentClassName = _ref4$parentClassName === void 0 ? "" : _ref4$parentClassName;
|
|
125
129
|
var _useState = (0, _react.useState)({
|
|
126
130
|
key: null,
|
|
127
131
|
direction: "asc"
|
|
@@ -189,6 +193,8 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
189
193
|
});
|
|
190
194
|
};
|
|
191
195
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
+
className: parentClassName
|
|
197
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
198
|
className: "table-responsive ".concat(nowrap ? "table-nowrap" : "", " ").concat(className)
|
|
193
199
|
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
194
200
|
className: "table table-vcenter ".concat(stickyHeader ? "sticky-top" : "", " ").concat(tableClassName)
|
|
@@ -220,8 +226,8 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
220
226
|
className: column.className || ""
|
|
221
227
|
}, column.render ? column.render(getValueByAccessor(row, column.accessor), row) : getValueByAccessor(row, column.accessor));
|
|
222
228
|
}));
|
|
223
|
-
}))), showPagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
|
-
className: "d-flex justify-content-between align-items-center mt-2"
|
|
229
|
+
})))), showPagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
|
+
className: "d-flex justify-content-between align-items-center mt-2 ".concat(paginationClassName)
|
|
225
231
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_index.Button, {
|
|
226
232
|
onClick: function onClick() {
|
|
227
233
|
return setCurrentPage(function (p) {
|
|
@@ -243,7 +249,11 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
243
249
|
style: {
|
|
244
250
|
marginLeft: 16
|
|
245
251
|
}
|
|
246
|
-
}, "Page ", currentPage, " of ", totalPages)
|
|
252
|
+
}, "Page ", currentPage, " of ", totalPages), /*#__PURE__*/_react["default"].createElement("span", {
|
|
253
|
+
style: {
|
|
254
|
+
marginLeft: 16
|
|
255
|
+
}
|
|
256
|
+
}, "Showing ", (currentPage - 1) * pageSize + 1, " to", " ", Math.min(currentPage * pageSize, totalRows), " of ", totalRows, " rows")), /*#__PURE__*/_react["default"].createElement(_index.DropdownInput, {
|
|
247
257
|
prompt: "Rows per page",
|
|
248
258
|
items: pageSizeOptions.map(function (size) {
|
|
249
259
|
return {
|