@absreim/react-bootstrap-data-grid 1.1.3 → 1.1.4
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/Grid.jsx +8 -2
- package/package.json +1 -1
package/Grid.jsx
CHANGED
|
@@ -39,7 +39,13 @@ var Grid = function (_a) {
|
|
|
39
39
|
if (pagination === undefined) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
var newPageSizeIndex = Number(event.target.value);
|
|
43
|
+
var newPageSize = pagination.pageSizeOptions[newPageSizeIndex];
|
|
44
|
+
var maxPages = Math.ceil(filteredRows.length / newPageSize);
|
|
45
|
+
pagination.setPageSizeIndex(newPageSizeIndex);
|
|
46
|
+
if (pagination.currentPage > maxPages) {
|
|
47
|
+
pagination.setCurrentPage(maxPages);
|
|
48
|
+
}
|
|
43
49
|
};
|
|
44
50
|
var handleToggleFilterOptions = function () {
|
|
45
51
|
setFilterOptionsVisible(!filterOptionsVisible);
|
|
@@ -73,7 +79,7 @@ var Grid = function (_a) {
|
|
|
73
79
|
</tr>
|
|
74
80
|
</thead>
|
|
75
81
|
<tbody>
|
|
76
|
-
{displayRows.map(function (row, index) { return (<tr key={row.origIndex} aria-rowindex={index + 2}>
|
|
82
|
+
{displayRows.map(function (row, index) { return (<tr key={row.origIndex} aria-rowindex={index + 2} data-rowindex={row.origIndex}>
|
|
77
83
|
{row.contents.map(function (value, index) { return (<td key={index} aria-colindex={index + 1}>
|
|
78
84
|
{value}
|
|
79
85
|
</td>); })}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absreim/react-bootstrap-data-grid",
|
|
3
3
|
"description": "Data grid UI component for use with web apps using React and Bootstrap",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Brook Li",
|
|
7
7
|
"homepage": "https://react-bootstrap-data-grid.vercel.app/",
|