@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/dist/index.mjs CHANGED
@@ -361,6 +361,11 @@ var SpreadsheetCell = ({
361
361
  style: {
362
362
  backgroundColor: isInSelection ? "rgb(239 246 255)" : getBackgroundColor(),
363
363
  minWidth: column.minWidth || column.width,
364
+ // Pinned columns need fixed width so sticky offset calculations are accurate
365
+ ...isPinned && {
366
+ width: column.minWidth || column.width,
367
+ maxWidth: column.minWidth || column.width
368
+ },
364
369
  ...positionStyles,
365
370
  ...selectionBorderStyles
366
371
  },
@@ -1202,6 +1207,11 @@ var SpreadsheetHeader = ({
1202
1207
  backgroundColor: highlightColor || "rgb(243 244 246)",
1203
1208
  // gray-100
1204
1209
  minWidth: column.minWidth || column.width,
1210
+ // Pinned columns need fixed width so sticky offset calculations are accurate
1211
+ ...isPinned && {
1212
+ width: column.minWidth || column.width,
1213
+ maxWidth: column.minWidth || column.width
1214
+ },
1205
1215
  top: 0,
1206
1216
  // For sticky header
1207
1217
  ...positionStyles
@@ -4014,7 +4024,9 @@ function Spreadsheet({
4014
4024
  position: "sticky",
4015
4025
  left: isPinnedLeft ? `${getColumnLeftOffset(item.columnId)}px` : void 0,
4016
4026
  right: !isPinnedLeft ? `${getColumnRightOffset(item.columnId)}px` : void 0,
4017
- minWidth: col?.minWidth || col?.width
4027
+ minWidth: col?.minWidth || col?.width,
4028
+ width: col?.minWidth || col?.width,
4029
+ maxWidth: col?.minWidth || col?.width
4018
4030
  }
4019
4031
  },
4020
4032
  `pinned-group-${item.columnId}`