@absreim/react-bootstrap-data-grid-pro 2.6.0 → 2.6.1

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback, useMemo, useRef, } from "react";
4
4
  import classNames from "classnames";
5
5
  import getWidthStyle from "../grid/util/getWidthStyle";
@@ -22,6 +22,9 @@ const ColHeaderCellPro = ({ label, sortModel, ariaColIndex, additionalClasses, w
22
22
  const effectiveMinResizeWidth = minResizeWidth || defaultMinResizeWidth;
23
23
  const effectiveKbdResizeStep = keyboardResizeStep || 10;
24
24
  const clickToSortCellContents = useMemo(() => {
25
+ if (!sortModel) {
26
+ return _jsx(_Fragment, { children: label });
27
+ }
25
28
  if (!width || displayMode === "table") {
26
29
  // Testing has shown that content gets cut off in a table cell only if
27
30
  // the table "display" property is "block" and both "min-width" and
@@ -139,7 +142,7 @@ const ColHeaderCellPro = ({ label, sortModel, ariaColIndex, additionalClasses, w
139
142
  "rbdg-sort-toggler": cellIsClickable,
140
143
  "table-active": sortModel === null || sortModel === void 0 ? void 0 : sortModel.sortOrder,
141
144
  }, additionalClasses || []), onClick: cellIsClickable ? handleClick : undefined, onMouseOver: cellIsClickable ? handleMouseOver : undefined, onMouseOut: cellIsClickable ? handleMouseOut : undefined, "aria-description": sortModel
142
- ? "Column header"
143
- : "Column header that can be clicked to change the sorting mode", "aria-colindex": ariaColIndex, "aria-sort": sortModel ? sortOrderToAriaSort(sortModel.sortOrder) : undefined, style: getWidthStyle(width), children: cellContents }));
145
+ ? "Column header that can be clicked to change the sorting mode"
146
+ : "Column header", "aria-colindex": ariaColIndex, "aria-sort": sortModel ? sortOrderToAriaSort(sortModel.sortOrder) : undefined, style: getWidthStyle(width), children: cellContents }));
144
147
  };
145
148
  export default ColHeaderCellPro;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@absreim/react-bootstrap-data-grid-pro",
3
3
  "description": "Pro Version of data grid UI component for use with web apps using React and Bootstrap",
4
- "version": "2.6.0",
4
+ "version": "2.6.1",
5
5
  "license": "Commercial. See LICENSE file.",
6
6
  "author": "Brook Li",
7
7
  "homepage": "https://react-bootstrap-data-grid.vercel.app/",