@lensui/lens-table 0.1.48 → 0.1.49

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/index.cjs CHANGED
@@ -3961,6 +3961,17 @@ function TableInner({
3961
3961
  }, [viewport.width]);
3962
3962
  const headerTooltip = (() => {
3963
3963
  if (!visibleHeaderTooltip) return null;
3964
+ if (visibleHeaderTooltip.action === "sort" || visibleHeaderTooltip.action === "filter") {
3965
+ const column = columns[visibleHeaderTooltip.columnIndex];
3966
+ if (column) {
3967
+ const label = visibleHeaderTooltip.action === "sort" ? sortState?.columnKey === column.key ? sortState.direction === "asc" ? labels.sortAsc : labels.sortDesc : labels.sortBoth : filterValues[column.key] ? labels.filterWithValue(filterValues[column.key]) : labels.filter;
3968
+ return {
3969
+ ...visibleHeaderTooltip,
3970
+ key: `${visibleHeaderTooltip.key}:${label}`,
3971
+ label
3972
+ };
3973
+ }
3974
+ }
3964
3975
  return visibleHeaderTooltip;
3965
3976
  })();
3966
3977
  const getRangeBounds = () => selectionRange ? {
package/dist/index.js CHANGED
@@ -3931,6 +3931,17 @@ function TableInner({
3931
3931
  }, [viewport.width]);
3932
3932
  const headerTooltip = (() => {
3933
3933
  if (!visibleHeaderTooltip) return null;
3934
+ if (visibleHeaderTooltip.action === "sort" || visibleHeaderTooltip.action === "filter") {
3935
+ const column = columns[visibleHeaderTooltip.columnIndex];
3936
+ if (column) {
3937
+ const label = visibleHeaderTooltip.action === "sort" ? sortState?.columnKey === column.key ? sortState.direction === "asc" ? labels.sortAsc : labels.sortDesc : labels.sortBoth : filterValues[column.key] ? labels.filterWithValue(filterValues[column.key]) : labels.filter;
3938
+ return {
3939
+ ...visibleHeaderTooltip,
3940
+ key: `${visibleHeaderTooltip.key}:${label}`,
3941
+ label
3942
+ };
3943
+ }
3944
+ }
3934
3945
  return visibleHeaderTooltip;
3935
3946
  })();
3936
3947
  const getRangeBounds = () => selectionRange ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensui/lens-table",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "A lightweight, canvas-rendered React table component for LensUI.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",