@bit.rhplus/ui.grid-layout 0.0.5 → 0.0.7

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.
@@ -330,12 +330,16 @@ export const useGridLayoutApi = ({
330
330
  ? userField.Show
331
331
  : !colDef.hide; // Fallback na opak column def hide hodnoty
332
332
 
333
+ // Vypočítáme finální šířku s debug logem
334
+ const finalWidth = userField.width !== undefined && userField.width !== null ? userField.width :
335
+ userField.Width !== undefined && userField.Width !== null ? userField.Width :
336
+ colDef.width !== undefined && colDef.width !== null ? colDef.width : 100;
337
+
333
338
  const result = {
334
339
  colId: colDef.field || colDef.colId,
335
340
  // API používá lowercase názvy polí - správně zachováváme i nulové hodnoty
336
- width: (userField.width != null) ? userField.width :
337
- (userField.Width != null) ? userField.Width :
338
- (colDef.width ?? 100),
341
+ // Priorita: userField.width -> userField.Width -> colDef.width -> 100
342
+ width: finalWidth,
339
343
  hide: !showValue, // Respektujeme přesně hodnotu show z API
340
344
  pinned: colDef.pinned || null, // Pinning z columnDefs, userFields to zatím nepodporuje
341
345
  sort: null, // Sorting není součástí layout managementu