@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.
- package/dist/useGridLayout.js +123 -410
- package/dist/useGridLayout.js.map +1 -1
- package/dist/useGridLayoutApi.js +6 -3
- package/dist/useGridLayoutApi.js.map +1 -1
- package/package.json +2 -2
- package/useGridLayout.js +132 -456
- package/useGridLayoutApi.js +7 -3
- /package/dist/{preview-1756735815679.js → preview-1756909601955.js} +0 -0
package/useGridLayoutApi.js
CHANGED
|
@@ -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
|
-
|
|
337
|
-
|
|
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
|
|
File without changes
|