Skip to content

Commit 6036266

Browse files
committed
minor bugfix, everything seems to be working
1 parent 3ff0595 commit 6036266

File tree

2 files changed

+7
-64
lines changed

2 files changed

+7
-64
lines changed

src/components/dashboard_items/Tree.vue

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -166,57 +166,6 @@ export default {
166166
}
167167
}
168168
}
169-
170-
// export default {
171-
// methods: {
172-
// // Called by transformToTree, formats componentMap
173-
// formatComponentMap(compMap) {
174-
// let result = [];
175-
// // Id to apply to each component, in accordance with Vue3Tree syntax
176-
// let id = 1;
177-
// const values = Object.values(compMap);
178-
// values.forEach((compData) => {
179-
// result.push({
180-
// id: id++,
181-
// label: compData.componentName, // previously was labeled 'name'
182-
// nodes: compData.children, // previously was labeled 'children'
183-
// });
184-
// });
185-
// return result;
186-
// },
187-
// // Called by buildTree, transforms componentMap
188-
// // we need to change this to clean the data and transform it to something usable by vue3tree
189-
// transformToTree(data) {
190-
// let result = {};
191-
// const temp = {};
192-
// const formattedData = this.formatComponentMap(data);
193-
// formattedData.forEach((component) => {
194-
// if (!temp[component.label]) {
195-
// temp[component.label] = { label: component.label, nodes: [] };
196-
// result = temp;
197-
// }
198-
// component.nodes.forEach((child) => {
199-
// if (!temp[child]) temp[child] = { label: child, nodes: [] };
200-
// temp[component.label].nodes.push(temp[child]);
201-
// });
202-
// });
203-
// return result;
204-
// },
205-
// // Called by computedTree, calls transformToTree
206-
// buildTree() {
207-
// let build = this.transformToTree(this.componentMap);
208-
// return build["App"];
209-
// },
210-
// },
211-
// watch: {
212-
// componentMap: {
213-
// deep: true,
214-
// handler() {
215-
// this.buildTree();
216-
// },
217-
// },
218-
// },
219-
// };
220169
</script>
221170

222171
<style lang="scss" scoped>

src/components/home_sidebar_items/ComponentTab/EditDeleteComponents.vue

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,7 @@ Description:
4444
:option-height="20"
4545
:searchable="false"
4646
/>
47-
<!-- <div>
48-
<q-btn
49-
v-if="childrenSelected.length"
50-
id="add-props-btn"
51-
class="add-btn"
52-
color="secondary"
53-
label="Update Children"
54-
@click="handleAddChild(childrenSelected)"
55-
/>
56-
</div> -->
47+
5748
<q-list
5849
class="accordBorder"
5950
active-color="secondary"
@@ -172,6 +163,7 @@ export default {
172163
return {
173164
value: "",
174165
newName: "",
166+
childrenSelected: [],
175167
};
176168
},
177169
components: {
@@ -191,9 +183,6 @@ export default {
191183
"componentMap",
192184
"exportAsTypescript",
193185
]),
194-
childrenSelected(){
195-
return this.componentMap[this.activeComponent].children
196-
},
197186
198187
activeRouteDisplay() {
199188
let component = this.routes[this.activeRoute];
@@ -320,6 +309,11 @@ export default {
320309
activeComponentObj: function () {
321310
if (this.activeComponentObj)
322311
this.newName = this.activeComponentObj.componentName;
312+
if (this.activeComponent !== ''){
313+
this.childrenSelected = this.componentMap[this.activeComponent].children;
314+
} else {
315+
this.childrenSelected = [];
316+
}
323317
},
324318
},
325319
};

0 commit comments

Comments
 (0)