vueless 0.0.541 → 0.0.542
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 +1 -1
- package/ui.data-table/UTable.vue +18 -5
- package/web-types.json +1 -1
package/package.json
CHANGED
package/ui.data-table/UTable.vue
CHANGED
|
@@ -91,6 +91,8 @@ const footerRowRef = useTemplateRef<HTMLTableRowElement>("footer-row");
|
|
|
91
91
|
const tableWrapperRef = useTemplateRef<HTMLDivElement>("table-wrapper");
|
|
92
92
|
const stickyFooterRowRef = useTemplateRef<HTMLTableRowElement>("sticky-footer-row");
|
|
93
93
|
const stickyHeaderRowRef = useTemplateRef<HTMLDivElement>("sticky-header-row");
|
|
94
|
+
const stickyActionHeaderRowRef = useTemplateRef<HTMLDivElement>("sticky-action-header-row");
|
|
95
|
+
const actionHeaderRowRef = useTemplateRef<HTMLDivElement>("action-header-row");
|
|
94
96
|
|
|
95
97
|
const i18nGlobal = tm(UTable);
|
|
96
98
|
const currentLocale = computed(() => merge(defaultConfig.i18n, i18nGlobal, props.config.i18n));
|
|
@@ -326,10 +328,21 @@ function setFooterCellWidth(zero?: null) {
|
|
|
326
328
|
}
|
|
327
329
|
|
|
328
330
|
function setHeaderCellWidth() {
|
|
329
|
-
if (
|
|
331
|
+
if (
|
|
332
|
+
!headerRowRef.value ||
|
|
333
|
+
!stickyHeaderRowRef.value ||
|
|
334
|
+
!stickyActionHeaderRowRef.value ||
|
|
335
|
+
!actionHeaderRowRef.value
|
|
336
|
+
) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
330
339
|
|
|
331
|
-
const mainHeaderItems = [...
|
|
332
|
-
const stickyHeaderItems = [
|
|
340
|
+
const mainHeaderItems = [...headerRowRef.value.children] as HTMLElement[];
|
|
341
|
+
const stickyHeaderItems = [
|
|
342
|
+
...stickyHeaderRowRef.value.children,
|
|
343
|
+
...stickyActionHeaderRowRef.value.children,
|
|
344
|
+
...actionHeaderRowRef.value.children,
|
|
345
|
+
] as HTMLElement[];
|
|
333
346
|
|
|
334
347
|
stickyHeaderItems.forEach((item, index) => {
|
|
335
348
|
item.style.width = `${mainHeaderItems[index]?.offsetWidth / PX_IN_REM}rem`;
|
|
@@ -486,7 +499,7 @@ defineExpose({
|
|
|
486
499
|
|
|
487
500
|
<div
|
|
488
501
|
v-show="isShownActionsHeader && isHeaderSticky"
|
|
489
|
-
ref="sticky-header-row"
|
|
502
|
+
ref="sticky-action-header-row"
|
|
490
503
|
:style="tableRowWidthStyle"
|
|
491
504
|
v-bind="stickyHeaderAttrs"
|
|
492
505
|
>
|
|
@@ -518,7 +531,7 @@ defineExpose({
|
|
|
518
531
|
|
|
519
532
|
<div
|
|
520
533
|
v-show="isShownActionsHeader && !isHeaderSticky"
|
|
521
|
-
ref="
|
|
534
|
+
ref="action-header-row"
|
|
522
535
|
:style="tableRowWidthStyle"
|
|
523
536
|
v-bind="stickyHeaderAttrs"
|
|
524
537
|
class="absolute"
|