@open-grid/primitives 0.2.0 → 0.3.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -77,7 +77,8 @@ var GRID_FOCUSED_CELL_SELECTOR = '[role="gridcell"][data-focused="true"]';
77
77
  var GRID_INTERACTIVE_KEYBOARD_TARGET_SELECTOR = "button, input, select, textarea, a[href], [contenteditable]:not([contenteditable='false']), [role='button'], [role='menuitem'], [role='separator'], [role='slider'], [role='textbox'], [role='combobox'], [role='searchbox'], [role='spinbutton']";
78
78
  function getGridProps(grid, options = {}) {
79
79
  const headerRowCount = getGridHeaderRowCount(grid, options);
80
- const rowCount = grid.getOptions().manualPagination ? -1 : headerRowCount + Math.max(1, grid.getPrePaginationRowModel().rows.length);
80
+ const hasKnownRowCount = !grid.getOptions().manualPagination || typeof grid.getOptions().rowCount === "number";
81
+ const rowCount = hasKnownRowCount ? headerRowCount + Math.max(1, grid.getRowCount()) : -1;
81
82
  const columnCount = grid.getVisibleLeafColumns().length;
82
83
  return {
83
84
  role: "grid",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-grid/primitives",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Unstyled primitive prop helpers for Open Grid.",
5
5
  "keywords": [
6
6
  "data-grid",
@@ -36,7 +36,7 @@
36
36
  "lint": "tsc --noEmit"
37
37
  },
38
38
  "dependencies": {
39
- "@open-grid/core": "0.2.0"
39
+ "@open-grid/core": "0.3.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "tsup": "^8.3.5",