@appscode/design-system 1.0.43-alpha.207 → 1.0.43-alpha.209
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
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
>
|
|
10
10
|
<slot name="content-left-controls" />
|
|
11
11
|
<header-item>
|
|
12
|
-
<search-bar v-if="searchable" @search="
|
|
12
|
+
<search-bar v-if="searchable" @search="updateSearchText" />
|
|
13
13
|
</header-item>
|
|
14
14
|
<slot name="content-right-controls" />
|
|
15
15
|
</content-header>
|
|
16
16
|
</template>
|
|
17
|
-
<slot
|
|
17
|
+
<slot
|
|
18
|
+
name="content"
|
|
19
|
+
:search-text="searchText"
|
|
20
|
+
:update-search-text="updateSearchText"
|
|
21
|
+
/>
|
|
18
22
|
</content-layout>
|
|
19
23
|
</template>
|
|
20
24
|
|
|
@@ -41,8 +45,8 @@ export default defineComponent({
|
|
|
41
45
|
},
|
|
42
46
|
hideHeader: {
|
|
43
47
|
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
}
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
46
50
|
},
|
|
47
51
|
components: {
|
|
48
52
|
ContentLayout: defineAsyncComponent(() =>
|
|
@@ -66,5 +70,11 @@ export default defineComponent({
|
|
|
66
70
|
searchText: "",
|
|
67
71
|
};
|
|
68
72
|
},
|
|
73
|
+
|
|
74
|
+
methods: {
|
|
75
|
+
updateSearchText(text) {
|
|
76
|
+
this.searchText = text;
|
|
77
|
+
},
|
|
78
|
+
},
|
|
69
79
|
});
|
|
70
80
|
</script>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
</th>
|
|
19
19
|
</table-row>
|
|
20
20
|
<table-row v-else>
|
|
21
|
+
<th v-if="collapsible" style="width: 20px" />
|
|
21
22
|
<th
|
|
22
23
|
v-for="(tableHeader, idx) in tableHeaders"
|
|
23
24
|
:key="idx"
|
|
@@ -127,6 +128,10 @@ export default defineComponent({
|
|
|
127
128
|
type: Array,
|
|
128
129
|
default: () => [],
|
|
129
130
|
},
|
|
131
|
+
collapsible: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: false,
|
|
134
|
+
},
|
|
130
135
|
actionable: {
|
|
131
136
|
type: Boolean,
|
|
132
137
|
default: false,
|
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
86
|
|
|
87
|
-
emits: ["rowselect"],
|
|
87
|
+
emits: ["rowselect", "rowexpand"],
|
|
88
88
|
|
|
89
89
|
components: {
|
|
90
90
|
TableCell: defineAsyncComponent(() =>
|
|
@@ -107,6 +107,12 @@ export default defineComponent({
|
|
|
107
107
|
methods: {
|
|
108
108
|
toggleCollapse() {
|
|
109
109
|
this.isCollapsed = !this.isCollapsed;
|
|
110
|
+
if (!this.isCollapsed) {
|
|
111
|
+
this.$emit("rowexpand", this.collapseRow);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
collapseRow() {
|
|
115
|
+
this.isCollapsed = true;
|
|
110
116
|
},
|
|
111
117
|
},
|
|
112
118
|
});
|