@itfin/components 1.3.34 → 1.3.36

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.
@@ -1,15 +1,10 @@
1
1
  <template>
2
2
 
3
- <recycle-scroller
4
- class="scroller"
5
- page-mode
6
- :items="rows"
7
- :item-size="rowHeight"
8
- key-field="Id"
9
- v-slot="{ item }"
10
- direction="vertical"
11
- >
12
- <div group="items" data-test="table-item" class="table-view-item grouped draggable-item">
3
+ <div class="scroller">
4
+ <div
5
+ v-for="(item, n) in rows"
6
+ :key="n"
7
+ group="items" data-test="table-item" class="table-view-item grouped draggable-item">
13
8
  <div class="table-row-template">
14
9
  <div accept-group="items" class="table-view-body-space"></div>
15
10
  <div class="shadow-area">
@@ -24,32 +19,35 @@
24
19
  </div>
25
20
  <div class="indicator sticky">
26
21
  <div class="fill on-rest table-view-row-count">
27
- <span>{{ item.Id }}</span>
22
+ <!-- <span>{{ item[idProperty] }}</span>-->
28
23
  </div>
29
24
  <div class="fill on-hover">
30
- <a href="" data-test="table-item-expand">
31
- <i class="ic-expand"></i>
32
- </a>
33
- <div class="">
34
- <a data-test="table-row-generator" href="">
35
- <i class="ic-plus"></i>
36
- </a>
37
- </div>
25
+ <itf-checkbox :value="item[idProperty]" />
38
26
  </div>
39
27
  </div>
40
28
  <div accept-group="items" class="table-item-inner">
41
- <template v-for="(column, n) in visibleAttributes">
29
+ <template v-for="(column, k) in visibleAttributes">
42
30
  <div
43
31
  v-if="column.visible !== false"
44
- :data-column="n"
32
+ :data-column="k"
45
33
  :style="`width: ${column.width}px; left: ${column.left}px;`"
46
- :class="{'sticky': column.pinned, 'last-sticky-column': n === lastPinnedIndex, 'flex-grow-1': column.grow}"
47
- class="table-view-item-value d-flex h-100 align-items-stretch px-2">
34
+ :class="{'sticky': column.pinned, 'last-sticky-column': k === lastPinnedIndex, 'flex-grow-1': column.grow}"
35
+ class="table-view-item-value d-flex h-100 align-items-stretch">
48
36
  <slot :name="`column.${column.name}`" :item="item" :column="column">
49
- <template v-if="editTypes[column.Type]">
50
- <property-inline-edit :value="item[column.field]" :field="column" editable focused />
37
+ <template v-if="column.editable">
38
+ <slot :name="`edit.${column.type}`" :value="getValue(item, column)" :item="item" :column="column">
39
+ <div class="px-1 py-1 w-100">
40
+ <itf-text-field v-if="column.type === 'text'" :value="getValue(item, column)" @input="updateValue(item, $event, n)" />
41
+ <itf-textarea autogrow v-else-if="column.type === 'textarea'" :value="getValue(item, column)" @input="updateValue(item, $event)" />
42
+ <itf-money-field v-else-if="column.type === 'money'" no-currency-sign currency-disabled :currency-select="false" :value="getValue(item, column)" @input="updateValue(item, $event)" />
43
+ </div>
44
+ </slot>
45
+ </template>
46
+ <template v-else>
47
+ <slot :name="`format.${column.type}`" :value="getValue(item, column)" :item="item" :column="column">
48
+ <div class="px-2 w-100">{{getValue(item, column)}}</div>
49
+ </slot>
51
50
  </template>
52
- <div v-else v-text="item.Name" />
53
51
  </slot>
54
52
  </div>
55
53
  </template>
@@ -61,7 +59,7 @@
61
59
  </div>
62
60
  </div>
63
61
  </div>
64
- </recycle-scroller>
62
+ </div>
65
63
  </template>
66
64
  <style lang="scss">
67
65
  .table-row-template {
@@ -70,7 +68,6 @@
70
68
  align-items: stretch;
71
69
  }
72
70
  .table-item-inner {
73
- height: 100%;
74
71
  flex-grow: 1;
75
72
  position: relative;
76
73
  display: flex;
@@ -83,7 +80,6 @@
83
80
  border-right: 1px solid var(--bs-border-color);
84
81
  border-bottom: 1px solid var(--bs-border-color);
85
82
  align-items: stretch;
86
- height: 100%;
87
83
  display: flex;
88
84
  position: relative;
89
85
  line-height: var(--itf-table-line-height);
@@ -108,7 +104,7 @@
108
104
  }
109
105
  }
110
106
  &:hover {
111
- background-color: var(--itf-table-hover-bg);
107
+ background-color: var(--bs-tertiary-bg);
112
108
  }
113
109
 
114
110
  &.sticky {
@@ -119,20 +115,19 @@
119
115
  }
120
116
 
121
117
  .table-item-inner .extra {
122
- height: 100%;
123
118
  flex-grow: 1;
124
119
  border-color: var(--bs-border-color);
125
120
  }
126
121
 
127
122
  .indicator {
128
- height: 100%;
123
+ //height: 100%;
129
124
  left: var(--shadow-area-width);
130
125
  width: var(--indicator-area-width);
131
126
  z-index: 4;
132
127
  position: -webkit-sticky;
133
128
  position: sticky;
134
129
  background-color: var(--bs-body-bg);
135
- border-right: 1px solid var(--bs-border-color);
130
+ //border-right: 1px solid var(--bs-border-color);
136
131
  border-bottom: 1px solid var(--bs-border-color);
137
132
  display: flex;
138
133
  align-items: center;
@@ -140,6 +135,31 @@
140
135
  min-width: var(--itf-table-min-width);
141
136
  }
142
137
 
138
+ .table-row-template, .table-view-header-value {
139
+ .form-check {
140
+ padding: 0;
141
+ margin-bottom: 0;
142
+
143
+ .form-check-input {
144
+ margin-left: 0;
145
+ }
146
+ }
147
+ }
148
+ .table-row-template {
149
+ .on-hover {
150
+ display: none;
151
+ }
152
+ &:hover, .permanent-checkboxes & {
153
+ .on-rest {
154
+ display: none;
155
+ }
156
+
157
+ .on-hover {
158
+ display: block;
159
+ }
160
+ }
161
+ }
162
+
143
163
  .table-item-inner .boundary {
144
164
  z-index: 3;
145
165
  position: absolute;
@@ -172,7 +192,7 @@
172
192
  bottom: 0;
173
193
  }
174
194
  .table-small-row .table-view-item {
175
- height: var(--table-row-height);
195
+ // height: var(--table-row-height);
176
196
  }
177
197
  .resize-observer {
178
198
  position: absolute;
@@ -191,26 +211,33 @@
191
211
  </style>
192
212
  <script>
193
213
  import { Vue, Component, Prop } from 'vue-property-decorator';
194
- import { RecycleScroller } from 'vue-virtual-scroller'
195
- import sortBy from 'lodash/sortBy';
196
- import PropertyInlineEdit from '../customize/PropertyInlineEdit.vue';
197
- import { INLINE_TYPES } from '../customize/constants';
198
- import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
214
+ import get from 'lodash/get';
215
+ // import { RecycleScroller } from 'vue-virtual-scroller'
216
+ import itfCheckbox from '../checkbox/Checkbox.vue';
217
+ import itfTextField from '../text-field/TextField.vue';
218
+ import itfMoneyField from '../text-field/MoneyField.vue';
219
+ import itfTextarea from '../text-field/Textarea.vue';
220
+ // import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
199
221
 
200
222
  export default @Component({
201
223
  name: 'itfTableBody',
202
224
  components: {
203
- RecycleScroller,
204
- PropertyInlineEdit
225
+ itfCheckbox,
226
+ itfMoneyField,
227
+ itfTextarea,
228
+ itfTextField,
229
+ // RecycleScroller
205
230
  }
206
231
  })
207
232
  class itfTableBody extends Vue {
208
233
  @Prop() columns;
209
234
  @Prop() rows;
235
+ @Prop() idProperty;
210
236
  @Prop(Boolean) showAddColumn;
211
- @Prop({ type: Number, default: 40 }) rowHeight;
212
237
 
213
- editTypes = {};
238
+ getValue(item, column) {
239
+ return get(item, column.property);
240
+ }
214
241
 
215
242
  get visibleAttributes() {
216
243
  return this.columns;
@@ -220,10 +247,8 @@ class itfTableBody extends Vue {
220
247
  return this.columns.findIndex((column) => column.lastPinned);
221
248
  }
222
249
 
223
- mounted() {
224
- for (const { Type } of INLINE_TYPES) {
225
- this.editTypes[Type] = true;
226
- }
250
+ updateValue(item, value, index) {
251
+ this.$emit('update', { index, item, value });
227
252
  }
228
253
  }
229
254
  </script>
@@ -7,31 +7,19 @@
7
7
  </div-->
8
8
 
9
9
  <div data-test="table-group-wrapper" class="table-group-wrapper flex-grow-1 w-100 d-block"
10
- :style="`--row-count: ${isShowTable ? rows.length : 0}`">
11
- <div class="">
12
- <div data-test="table-group" class="position-relative">
13
- <itf-table-header
14
- v-if="showHeader"
15
- :columns="visibleColumns"
16
- @sort:columns="onColumnsSorted"
17
- :column-resizing="columnResizing"
18
- :column-sorting="columnSorting"
19
- :show-add-column="showAddColumn"
20
- :row-height="rowHeight"
21
- @update:columns="$emit('update:columns', $event)"
22
- @add-column="$emit('add-column', $event)"
23
- />
24
-
10
+ :style="`--row-count: ${isShowTable ? rows.length : 0}`" data-sticky-container>
11
+ <div data-test="table-group" class="position-relative">
12
+ <div :class="stickyId" class="sticky-group">
25
13
  <div v-if="title" group="tablegroups" class="draggable-item"
26
14
  data-draggable-mirror="{&quot;xAxis&quot;:false}">
27
15
  <div class="table-row-template d-flex align-items-stretch"
28
- style="height: var(--group-title-height)">
16
+ style="min-height: var(--group-title-height)">
29
17
  <div class="shadow-area"></div>
30
- <div class="header-wrapper">
31
- <div class="header-content position-sticky d-flex align-items-center">
32
- <a href="" class="collapse-arrow" @click.prevent="toggleGroup">
18
+ <div class="header-wrapper" :class="{'header-additional-column': showAddColumn}" @click.prevent="toggleGroup">
19
+ <a class="header-content position-sticky d-flex align-items-center">
20
+ <span class="collapse-arrow">
33
21
  <itf-icon :name="isShowTable ? 'chevron_down' : 'chevron_right'"/>
34
- </a>
22
+ </span>
35
23
  <span class="d-flex align-items-center line-overflow group-header-value"
36
24
  data-test="group-value-group-label-value">
37
25
  {{ title }}
@@ -39,97 +27,114 @@
39
27
  <div data-test="table-group-item-count" class="table-group-item-count">
40
28
  {{ rows.length }}
41
29
  </div>
42
- </div>
30
+ </a>
43
31
  </div>
44
32
  </div>
45
33
  </div>
46
34
 
47
- <!-- Сама таблиця -->
48
- <div v-if="isShowTable">
49
- <itf-table-body
50
- :rows="rows"
51
- :columns="visibleColumns"
52
- :row-height="rowHeight"
53
- :show-add-column="showAddColumn">
54
- <template v-for="(_, name) in $slots" #[name]="slotData">
55
- <slot :name="name" v-bind="slotData || {}"/>
56
- </template>
57
- <template v-for="(_, name) in $scopedSlots" #[name]="slotData">
58
- <slot :name="name" v-bind="slotData || {}"/>
59
- </template>
60
- </itf-table-body>
61
- </div>
35
+ <itf-table-header
36
+ v-if="isShowTable"
37
+ :visible-header="showHeader"
38
+ :columns="visibleColumns"
39
+ @sort:columns="onColumnsSorted"
40
+ :column-resizing="columnResizing"
41
+ :column-sorting="columnSorting"
42
+ :show-add-column="showAddColumn"
43
+ :rows="rows"
44
+ :schema="schema"
45
+ :selected-ids="selectedIds"
46
+ @update:selectedIds="$emit('update:selectedIds', $event)"
47
+ @update:columns="$emit('update:columns', $event)"
48
+ @add-column="$emit('add-column', $event)"
49
+ />
50
+ </div>
62
51
 
63
- <!-- Лінія додати нову -->
64
- <div v-if="isShowTable && addNewRows"
65
- class="table-row-template d-flex align-items-stretch">
66
- <div class="shadow-area"></div>
67
- <a href="" data-test="table-add-new-item"
68
- class="d-flex align-items-center flex-grow-1 table-add-new-item">
69
- <span class="d-sticky d-flex align-items-center px-2">
70
- <itf-icon name="plus"/>
71
- <span>Add new row</span>
72
- </span>
73
- </a>
74
- </div>
52
+ <!-- Сама таблиця -->
53
+ <div v-if="isShowTable">
54
+ <itf-table-body
55
+ @update="$emit('update', $event)"
56
+ :id-property="idProperty"
57
+ :rows="rows"
58
+ :columns="visibleColumns"
59
+ :show-add-column="showAddColumn">
60
+ <template v-for="(_, name) in $slots" #[name]="slotData">
61
+ <slot :name="name" v-bind="slotData || {}"/>
62
+ </template>
63
+ <template v-for="(_, name) in $scopedSlots" #[name]="slotData">
64
+ <slot :name="name" v-bind="slotData || {}"/>
65
+ </template>
66
+ </itf-table-body>
67
+ </div>
68
+
69
+ <!-- Лінія додати нову -->
70
+ <div v-if="isShowTable && addNewRows"
71
+ class="table-row-template d-flex align-items-stretch">
72
+ <div class="shadow-area"></div>
73
+ <a href="" @click.prevent="$emit('new', title)" data-test="table-add-new-item"
74
+ class="d-flex align-items-center flex-grow-1 table-add-new-item py-1 text-decoration-none">
75
+ <span class="d-sticky d-flex align-items-center">
76
+ <itf-icon name="plus"/>
77
+ <span>{{ newLabel }}</span>
78
+ </span>
79
+ </a>
80
+ </div>
75
81
 
76
- <!-- Групування -->
77
- <div v-if="showSummary" class="table-row-template d-flex align-items-stretch table-summary">
78
- <div class="shadow-area"></div>
79
-
80
- <div class="table-summary-columns d-flex tw-flex-row align-items-center">
81
- <span
82
- v-for="(column, n) in visibleColumns"
83
- :key="n"
84
- :data-column="n"
85
- class="table-summary-column position-relative line-overflow"
86
- :style="`width: ${column.width}px;`">
87
- <itf-dropdown text>
88
- <template #button>
89
- <span data-test="summary-column" class="invisible-summary d-flex align-items-center justify-content-end flex-auto">
90
- <span class="summary-placeholder align-items-center justify-content-center">
91
- Summary
92
- <itf-icon name="chevron_down" />
93
- </span>
82
+ <!-- Групування -->
83
+ <div v-if="isShowTable && showSummary" class="table-row-template d-flex align-items-stretch table-summary">
84
+ <div class="shadow-area"></div>
85
+
86
+ <div class="table-summary-columns d-flex tw-flex-row align-items-center">
87
+ <span
88
+ v-for="(column, n) in visibleColumns"
89
+ :key="n"
90
+ :data-column="n"
91
+ class="table-summary-column position-relative line-overflow"
92
+ :style="`width: ${column.width}px;`">
93
+ <itf-dropdown text>
94
+ <template #button>
95
+ <span data-test="summary-column" class="invisible-summary d-flex align-items-center justify-content-end flex-auto">
96
+ <span class="summary-placeholder align-items-center justify-content-center">
97
+ Summary
98
+ <itf-icon name="chevron_down" />
94
99
  </span>
95
- </template>
96
-
97
- <ul class="dropdown-menu show ps-0" aria-labelledby="dropdownMenuOffset">
98
- <li v-if="column.sortable">
99
- <a class="dropdown-item d-flex align-items-center" href="javascript:;">
100
- <itf-icon name="arrow_up" :size="16" class="me-1" />
101
- Sort By Asc
102
- </a>
103
- </li>
104
- <li v-if="column.sortable">
105
- <a class="dropdown-item d-flex align-items-center" href="javascript:;">
106
- <itf-icon name="arrow_down" :size="16" class="me-1" />
107
- Sort By Desc
108
- </a>
109
- </li>
110
- <li v-if="column.groupable">
111
- <a class="dropdown-item d-flex align-items-center" href="javascript:;">
112
- <itf-icon name="episodes" :size="16" class="me-1" />
113
- Group By
114
- </a>
115
- </li>
116
- <li>
117
- <a class="dropdown-item d-flex align-items-center" href="javascript:;" @click="togglePinned(n)">
118
- <itf-icon :name="column.pinned ? 'checkbox_checked' : 'checkbox_empty'" :size="16" class="me-1" />
119
- <span v-if="column.pinned">Unpin Column</span>
120
- <span v-else>Pin Column</span>
121
- </a>
122
- </li>
123
- <li>
124
- <a class="dropdown-item d-flex align-items-center" href="javascript:;" @click="hideColumn(n)">
125
- <itf-icon name="eye_no" :size="16" class="me-1" />
126
- Hide
127
- </a>
128
- </li>
129
- </ul>
130
- </itf-dropdown>
131
- </span>
132
- </div>
100
+ </span>
101
+ </template>
102
+
103
+ <ul class="dropdown-menu show ps-0" aria-labelledby="dropdownMenuOffset">
104
+ <li v-if="column.sortable">
105
+ <a class="dropdown-item d-flex align-items-center" href="javascript:;">
106
+ <itf-icon name="arrow_up" :size="16" class="me-1" />
107
+ Sort By Asc
108
+ </a>
109
+ </li>
110
+ <li v-if="column.sortable">
111
+ <a class="dropdown-item d-flex align-items-center" href="javascript:;">
112
+ <itf-icon name="arrow_down" :size="16" class="me-1" />
113
+ Sort By Desc
114
+ </a>
115
+ </li>
116
+ <li v-if="column.groupable">
117
+ <a class="dropdown-item d-flex align-items-center" href="javascript:;">
118
+ <itf-icon name="episodes" :size="16" class="me-1" />
119
+ Group By
120
+ </a>
121
+ </li>
122
+ <li>
123
+ <a class="dropdown-item d-flex align-items-center" href="javascript:;" @click="togglePinned(n)">
124
+ <itf-icon :name="column.pinned ? 'checkbox_checked' : 'checkbox_empty'" :size="16" class="me-1" />
125
+ <span v-if="column.pinned">Unpin Column</span>
126
+ <span v-else>Pin Column</span>
127
+ </a>
128
+ </li>
129
+ <li>
130
+ <a class="dropdown-item d-flex align-items-center" href="javascript:;" @click="hideColumn(n)">
131
+ <itf-icon name="eye_no" :size="16" class="me-1" />
132
+ Hide
133
+ </a>
134
+ </li>
135
+ </ul>
136
+ </itf-dropdown>
137
+ </span>
133
138
  </div>
134
139
  </div>
135
140
  </div>
@@ -144,6 +149,7 @@
144
149
  --table-small-row-size: var(--table-row-height);
145
150
  --shadow-area-width: 12px;
146
151
  --indicator-area-width: 38px;
152
+ --hover-bg: var(--bs-tertiary-bg);
147
153
 
148
154
  flex-direction: column;
149
155
  min-width: 100%;
@@ -162,15 +168,31 @@
162
168
  border-bottom: 4px solid rgb(71 190 255 / 1);
163
169
  }
164
170
  }
171
+ .sticky-group {
172
+ transition: transform 0.02s;
173
+ }
174
+ .sticky-group.sticky {
175
+ z-index: 5;
176
+
177
+ &:before {
178
+ content: '';
179
+ position: absolute;
180
+ left: 0;
181
+ right: 0;
182
+ top: -50px;
183
+ height: 50px;
184
+ background: var(--bs-body-bg);
185
+ }
186
+ }
165
187
 
166
188
  .table-group-wrapper {
167
189
  display: flex;
168
- height: calc(var(--group-title-height) + var(--table-small-row-size) * 1 + var(--row-count) * var(--table-row-height));
190
+ //height: calc(var(--group-title-height) + var(--table-small-row-size) * 1 + var(--row-count) * var(--table-row-height));
169
191
  }
170
192
 
171
193
  .shadow-area {
172
194
  z-index: 4;
173
- height: 100%;
195
+ //height: 100%;
174
196
  width: var(--shadow-area-width);
175
197
  justify-content: center;
176
198
  align-items: center;
@@ -180,7 +202,7 @@
180
202
  position: sticky;
181
203
  left: 0;
182
204
  background: var(--bs-body-bg);
183
- border-right: 1px solid var(--bs-border-color);
205
+ //border-right: 1px solid var(--bs-border-color);
184
206
  }
185
207
 
186
208
  .header-wrapper:not(.collapsed *) {
@@ -190,6 +212,7 @@
190
212
  }
191
213
 
192
214
  .header-wrapper {
215
+ cursor: pointer;
193
216
  background-color: var(--bs-body-bg);
194
217
  left: var(--shadow-area-width);
195
218
  align-items: center;
@@ -197,13 +220,23 @@
197
220
  position: -webkit-sticky;
198
221
  position: sticky;
199
222
  border-radius: 0.1875rem;
200
- border-bottom-width: 1px;
201
- border-bottom-style: solid;
202
223
  font-weight: 500;
203
224
  font-size: 1.25rem;
204
- border-color: rgb(238 238 238 / 1);
225
+ border-left: 0;
226
+ border-bottom: 0;
227
+ border-right: 1px solid var(--bs-border-color);
228
+
229
+ &.header-additional-column {
230
+ border-radius: 0;
231
+ }
232
+ &:hover {
233
+ background: var(--hover-bg);
234
+ }
205
235
  }
206
236
 
237
+ .header-content {
238
+ text-decoration: none;
239
+ }
207
240
  .header-content:not(.draggable-mirror *) {
208
241
  left: var(--shadow-area-width);
209
242
  padding-left: 0.75rem;
@@ -227,7 +260,7 @@
227
260
  }
228
261
 
229
262
  .table-row-template {
230
- height: var(--table-small-row-size);
263
+ min-height: var(--table-small-row-size);
231
264
  }
232
265
 
233
266
  .table-add-new-item {
@@ -237,6 +270,10 @@
237
270
  & > span {
238
271
  left: var(--shadow-area-width);
239
272
  position: sticky;
273
+ padding-left: var(--shadow-area-width);
274
+ }
275
+ &:hover {
276
+ background: var(--hover-bg);
240
277
  }
241
278
  }
242
279
 
@@ -263,12 +300,13 @@
263
300
  </style>
264
301
  <script>
265
302
  import sortBy from 'lodash/sortBy';
266
- import {Vue, Component, Prop} from 'vue-property-decorator';
303
+ import {Vue, Component, Prop, Watch} from 'vue-property-decorator';
267
304
  import itfDropdown from '../dropdown/Dropdown.vue';
268
305
  import itfButton from '../button/Button.vue';
269
306
  import itfIcon from '../icon/Icon.vue';
270
307
  import itfTableBody from './TableBody.vue';
271
308
  import itfTableHeader from './TableHeader.vue';
309
+ import Sticky from "./sticky";
272
310
 
273
311
  export default @Component({
274
312
  name: 'itfTableGroup',
@@ -283,7 +321,9 @@ export default @Component({
283
321
  class itfTableGroup extends Vue {
284
322
  @Prop() columns;
285
323
  @Prop() rows;
324
+ @Prop() selectedIds;
286
325
  @Prop() title;
326
+ @Prop() idProperty;
287
327
  @Prop(Boolean) showGrouping;
288
328
  @Prop(Boolean) showSummary;
289
329
  @Prop(Boolean) addNewRows;
@@ -291,13 +331,14 @@ class itfTableGroup extends Vue {
291
331
  @Prop(Boolean) columnResizing;
292
332
  @Prop(Boolean) showAddColumn;
293
333
  @Prop(Boolean) showHeader;
294
- @Prop({type: Number, default: 40}) rowHeight;
334
+ @Prop({type: String, default: function() { return this.$t('components.new'); } }) newLabel;
335
+ @Prop({type: Object, default: () => ({})}) schema;
295
336
 
296
337
  isShowTable = true;
297
338
 
298
339
  get visibleColumns() {
299
340
  let list = this.columns;
300
- list = sortBy(list, (column) => column.pinned ? 0 : 1);
341
+ list = sortBy(list, (column) => column.index);
301
342
  let left = 57; // sum of first 2 cells
302
343
  const pinned = list.filter((column) => column.pinned && column.visible !== false);
303
344
  list = list.map((column, index) => {
@@ -318,5 +359,17 @@ class itfTableGroup extends Vue {
318
359
  toggleGroup() {
319
360
  this.isShowTable = !this.isShowTable;
320
361
  }
362
+
363
+ get stickyId() {
364
+ return `sticky-group-${this._uid}`;
365
+ }
366
+
367
+ mounted() {
368
+ this.sticky = new Sticky(`.${this.stickyId}`, {
369
+ wrap: true,
370
+ stickyClass: 'sticky',
371
+ });
372
+ console.info(this.sticky);
373
+ }
321
374
  }
322
375
  </script>