lkt-table 2.0.24 → 2.0.26

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": "lkt-table",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lkt",
@@ -146,6 +146,7 @@ const emptyColumns = computed(() => {
146
146
  return Columns.value.filter((c: Column) => !c.hidden);
147
147
  }),
148
148
  hiddenColumns = computed(() => {
149
+ return [];
149
150
  return Columns.value.filter((c: Column) => c.hidden);
150
151
  }),
151
152
  hiddenColumnsColSpan = computed(() => {
@@ -453,11 +454,6 @@ const getItemByEvent = (e: any) => {
453
454
  if (!computedAccordionHeaderColumn.value) return '';
454
455
 
455
456
  return item[computedAccordionHeaderColumn.value.key];
456
- },
457
- getAccordionHeaderIcon = (item: LktObject, index: number) => {
458
- if (!computedAccordionHeaderColumn.value) return '';
459
-
460
- return computedAccordionHeaderColumn.value?.field?.icon;
461
457
  };
462
458
 
463
459
  onMounted(() => {
@@ -856,7 +852,7 @@ const hasEmptySlot = computed(() => {
856
852
  <template
857
853
  v-for="(item, i) in Items">
858
854
  <div
859
- v-if="canDisplayItem(item, i)"
855
+ v-if="!skipTableItemsContainer && canDisplayItem(item, i)"
860
856
  class="lkt-table-item"
861
857
  :class="getItemContainerClass(item, i)"
862
858
  :data-i="i"
@@ -873,6 +869,23 @@ const hasEmptySlot = computed(() => {
873
869
  v-bind:do-drop="() => onItemDrop(i)"
874
870
  />
875
871
  </div>
872
+ <slot
873
+ v-else-if="canDisplayItem(item, i)"
874
+ name="item"
875
+ :class="getItemContainerClass(item, i)"
876
+ :data-i="i"
877
+ :key="getRowKey(item, i)"
878
+
879
+ v-bind:[slotItemVar]="item"
880
+ v-bind:index="i"
881
+ v-bind:editing="editModeEnabled"
882
+ v-bind:can-create="hasCreatePerm"
883
+ v-bind:can-read="hasReadPerm"
884
+ v-bind:can-update="hasUpdatePerm"
885
+ v-bind:can-drop="hasDropPerm"
886
+ v-bind:is-loading="isLoading"
887
+ v-bind:do-drop="() => onItemDrop(i)"
888
+ />
876
889
  </template>
877
890
  </div>
878
891
 
@@ -892,9 +905,19 @@ const hasEmptySlot = computed(() => {
892
905
  v-bind="<AccordionConfig>{
893
906
  ...accordion,
894
907
  title: getAccordionHeaderText(item, i),
895
- icon: getAccordionHeaderIcon(item, i),
896
908
  }"
897
909
  >
910
+ <template #header>
911
+ <lkt-table-cell
912
+ v-model="Items[i]"
913
+ :i="i"
914
+ :column="computedAccordionHeaderColumn"
915
+ :columns="visibleColumns"
916
+ :edit-mode-enabled="editModeEnabled"
917
+ :has-inline-edit-perm="hasInlineEditPerm"
918
+ />
919
+ </template>
920
+
898
921
  <template v-for="column in visibleColumns">
899
922
  <lkt-table-cell
900
923
  v-if="column.key !== computedAccordionHeaderColumn?.key"