@xcelsior/ui-spreadsheets 1.1.11 → 1.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcelsior/ui-spreadsheets",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -883,6 +883,10 @@ export function Spreadsheet<T extends Record<string, any>>({
883
883
  : undefined,
884
884
  minWidth:
885
885
  col?.minWidth || col?.width,
886
+ width:
887
+ col?.minWidth || col?.width,
888
+ maxWidth:
889
+ col?.minWidth || col?.width,
886
890
  }}
887
891
  />
888
892
  );
@@ -273,6 +273,11 @@ const SpreadsheetCell: React.FC<SpreadsheetCellProps> = ({
273
273
  style={{
274
274
  backgroundColor: isInSelection ? 'rgb(239 246 255)' : getBackgroundColor(),
275
275
  minWidth: column.minWidth || column.width,
276
+ // Pinned columns need fixed width so sticky offset calculations are accurate
277
+ ...(isPinned && {
278
+ width: column.minWidth || column.width,
279
+ maxWidth: column.minWidth || column.width,
280
+ }),
276
281
  ...positionStyles,
277
282
  ...selectionBorderStyles,
278
283
  }}
@@ -71,6 +71,11 @@ export const SpreadsheetHeader: React.FC<
71
71
  style={{
72
72
  backgroundColor: highlightColor || 'rgb(243 244 246)', // gray-100
73
73
  minWidth: column.minWidth || column.width,
74
+ // Pinned columns need fixed width so sticky offset calculations are accurate
75
+ ...(isPinned && {
76
+ width: column.minWidth || column.width,
77
+ maxWidth: column.minWidth || column.width,
78
+ }),
74
79
  top: 0, // For sticky header
75
80
  ...positionStyles,
76
81
  }}