trotl-table 1.0.59 → 1.0.60

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.cjs.js CHANGED
@@ -10824,15 +10824,16 @@ function TableInner({
10824
10824
  cellStyle.maxWidth = col.style.width;
10825
10825
  cellStyle.width = col.style.width;
10826
10826
  }
10827
- // determine header title text for tooltip; custom columns may also have string headers
10828
- const headerTitle = typeof col.header === 'string' ? col.header : undefined;
10827
+ const translatedHeader = typeof col.header === "string" ? translate(col.header) : col.header;
10828
+ // Keep tooltip text in sync with rendered header when it's a string.
10829
+ const headerTitle = typeof translatedHeader === "string" ? translatedHeader : undefined;
10829
10830
  return /*#__PURE__*/React.createElement("div", {
10830
10831
  key: i,
10831
10832
  className: "table-cell",
10832
10833
  style: cellStyle,
10833
10834
  title: headerTitle,
10834
10835
  onClick: col.isCustom ? undefined : () => setSort(col.accessor)
10835
- }, col.isCustom ? col.header ?? '' : col.header, !col.isCustom && sorting?.column === col.accessor && (sorting.direction === "asc" ? " ↑" : " ↓"));
10836
+ }, col.isCustom ? translatedHeader ?? "" : translatedHeader, !col.isCustom && sorting?.column === col.accessor && (sorting.direction === "asc" ? " ↑" : " ↓"));
10836
10837
  }), showActions && /*#__PURE__*/React.createElement("div", {
10837
10838
  className: "table-cell action-cell",
10838
10839
  title: translate("action")