@bluemarble/bm-components 0.0.79 → 0.0.81
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/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -15046,8 +15046,7 @@ function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps,
|
|
|
15046
15046
|
} }, paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx) }),
|
|
15047
15047
|
React__default.createElement(Table, Object.assign({ size: "small", stickyHeader: true }, tableProps, { sx: Object.assign({}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) }),
|
|
15048
15048
|
React__default.createElement(TableHead, Object.assign({}, tableHeadProps),
|
|
15049
|
-
React__default.createElement(TableRow, null, columns.map((column) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? 'none' : 'normal', sx: Object.assign({ pl: 2 }, column === null || column === void 0 ? void 0 : column.sx) },
|
|
15050
|
-
React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false }, column.children ? column.children : column.label))))),
|
|
15049
|
+
React__default.createElement(TableRow, null, columns.map((column) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? 'none' : 'normal', sx: Object.assign({ pl: 2 }, column === null || column === void 0 ? void 0 : column.sx) }, column.children ? (column.children) : (React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false }, column.label)))))),
|
|
15051
15050
|
isLoading && (React__default.createElement(TableRow, null,
|
|
15052
15051
|
React__default.createElement(TableCell, { colSpan: columns.length, sx: { p: 0, border: 'none' } },
|
|
15053
15052
|
React__default.createElement(LinearProgress, null))))),
|
|
@@ -15203,7 +15202,7 @@ function useGrid({ columns, filters = [], rowsPerPageOptions = [30, 60, 100] })
|
|
|
15203
15202
|
const endPage = startPage + rowsPerPage;
|
|
15204
15203
|
return sortedData.slice(startPage, endPage);
|
|
15205
15204
|
}, [sortedBy, sortedDirection, filteredData, currentPage, rowsPerPage]);
|
|
15206
|
-
const totalNumberOfPages = Math.
|
|
15205
|
+
const totalNumberOfPages = Math.ceil(filteredData.length / rowsPerPage) - 1;
|
|
15207
15206
|
return {
|
|
15208
15207
|
data: displayData,
|
|
15209
15208
|
set,
|