tabler-react-2 0.1.127 → 0.1.129
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 +12 -4
- package/docs/src/docs/changelog.mdx +4 -0
- package/package.json +1 -1
package/dist/table/index.js
CHANGED
|
@@ -119,7 +119,13 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
119
119
|
_ref4$showPagination = _ref4.showPagination,
|
|
120
120
|
showPagination = _ref4$showPagination === void 0 ? false : _ref4$showPagination,
|
|
121
121
|
_ref4$defaultRowsPerP = _ref4.defaultRowsPerPage,
|
|
122
|
-
defaultRowsPerPage = _ref4$defaultRowsPerP === void 0 ? 10 : _ref4$defaultRowsPerP
|
|
122
|
+
defaultRowsPerPage = _ref4$defaultRowsPerP === void 0 ? 10 : _ref4$defaultRowsPerP,
|
|
123
|
+
_ref4$tableClassName = _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;
|
|
123
129
|
var _useState = (0, _react.useState)({
|
|
124
130
|
key: null,
|
|
125
131
|
direction: "asc"
|
|
@@ -187,9 +193,11 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
187
193
|
});
|
|
188
194
|
};
|
|
189
195
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
+
className: parentClassName
|
|
197
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
190
198
|
className: "table-responsive ".concat(nowrap ? "table-nowrap" : "", " ").concat(className)
|
|
191
199
|
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
192
|
-
className: "table table-vcenter ".concat(stickyHeader ? "sticky-top" : "")
|
|
200
|
+
className: "table table-vcenter ".concat(stickyHeader ? "sticky-top" : "", " ").concat(tableClassName)
|
|
193
201
|
}, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, columns.map(function (column, idx) {
|
|
194
202
|
return /*#__PURE__*/_react["default"].createElement("th", {
|
|
195
203
|
key: idx,
|
|
@@ -218,8 +226,8 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
218
226
|
className: column.className || ""
|
|
219
227
|
}, column.render ? column.render(getValueByAccessor(row, column.accessor), row) : getValueByAccessor(row, column.accessor));
|
|
220
228
|
}));
|
|
221
|
-
}))), showPagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
|
-
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)
|
|
223
231
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_index.Button, {
|
|
224
232
|
onClick: function onClick() {
|
|
225
233
|
return setCurrentPage(function (p) {
|