@itfin/components 1.4.15 → 1.4.17
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/src/components/view/View.vue +13 -9
package/package.json
CHANGED
|
@@ -41,13 +41,14 @@
|
|
|
41
41
|
</a>
|
|
42
42
|
</itf-dropdown>
|
|
43
43
|
|
|
44
|
+
<slot name="before-tabs"></slot>
|
|
45
|
+
|
|
44
46
|
<itf-segmented-control
|
|
45
47
|
v-if="tabs.length > 1"
|
|
46
48
|
class="small"
|
|
47
|
-
|
|
49
|
+
v-model="currentTab"
|
|
48
50
|
item-key="value"
|
|
49
51
|
:items="tabs"
|
|
50
|
-
@input="updateTabs"
|
|
51
52
|
>
|
|
52
53
|
<template #item="{ item }">
|
|
53
54
|
<div class="d-flex align-items-center">
|
|
@@ -79,8 +80,9 @@
|
|
|
79
80
|
id-property="id"
|
|
80
81
|
:sort-as-string="sortAsString"
|
|
81
82
|
:rows="items"
|
|
83
|
+
:group-by="groupBy"
|
|
82
84
|
:schema="tableSchema"
|
|
83
|
-
:sorting="sorting"
|
|
85
|
+
:sorting.sync="sorting"
|
|
84
86
|
:active="activeIds"
|
|
85
87
|
:no-select-all="noSelectAll"
|
|
86
88
|
:show-actions="showActions"
|
|
@@ -133,7 +135,8 @@ export default @Component({
|
|
|
133
135
|
name: 'itfView',
|
|
134
136
|
components: {
|
|
135
137
|
itfSegmentedControl,
|
|
136
|
-
itfDropdown,
|
|
138
|
+
itfDropdown,
|
|
139
|
+
itfIcon,
|
|
137
140
|
itfPagination,
|
|
138
141
|
itfFilterPanel,
|
|
139
142
|
itfTableBody,
|
|
@@ -154,6 +157,7 @@ class itfView extends Vue {
|
|
|
154
157
|
@Prop(String) endpoint;
|
|
155
158
|
@Prop(String) filtersEndpoint;
|
|
156
159
|
@Prop(String) itemsKey;
|
|
160
|
+
@Prop({ type: String, default: null }) groupBy;
|
|
157
161
|
@Prop({ type: String, default: 'totals' }) totalsKey;
|
|
158
162
|
@Prop(String) panelKey;
|
|
159
163
|
@Prop(String) stateName;
|
|
@@ -182,7 +186,6 @@ class itfView extends Vue {
|
|
|
182
186
|
loadingData = false;
|
|
183
187
|
activeIds = [];
|
|
184
188
|
tableColumns = undefined;
|
|
185
|
-
_currentTab = null;
|
|
186
189
|
totals = null;
|
|
187
190
|
|
|
188
191
|
@Watch('selectedIds', { deep: true, immediate: true })
|
|
@@ -198,6 +201,7 @@ class itfView extends Vue {
|
|
|
198
201
|
|
|
199
202
|
set currentTab(val) {
|
|
200
203
|
this.$emit('update:tab', val);
|
|
204
|
+
this.setPanelPayload({ tab: val });
|
|
201
205
|
}
|
|
202
206
|
|
|
203
207
|
get tabs() {
|
|
@@ -320,10 +324,6 @@ class itfView extends Vue {
|
|
|
320
324
|
localStorage.setItem('sizePerPage', val);
|
|
321
325
|
}
|
|
322
326
|
|
|
323
|
-
updateTabs(val) {
|
|
324
|
-
this.setPanelPayload({ tab: val });
|
|
325
|
-
}
|
|
326
|
-
|
|
327
327
|
setPanelPayload(payload) {
|
|
328
328
|
this.panel.setPayload(assignWithoutUndefined(this.panel.getPayload(), payload));
|
|
329
329
|
|
|
@@ -352,5 +352,9 @@ class itfView extends Vue {
|
|
|
352
352
|
setTableSchema(tableSchema) {
|
|
353
353
|
this.tableColumns = tableSchema;
|
|
354
354
|
}
|
|
355
|
+
|
|
356
|
+
getTableState() {
|
|
357
|
+
return this.$refs.table.getTableState();
|
|
358
|
+
}
|
|
355
359
|
}
|
|
356
360
|
</script>
|