From 49fa943063cd71285ba53676b12420f446f06998 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 19 Dec 2021 10:44:38 +0100 Subject: [PATCH] only have one creation form box open at a time. --- admin/src/components/UserTable.vue | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/admin/src/components/UserTable.vue b/admin/src/components/UserTable.vue index bb56c10c5..35867f137 100644 --- a/admin/src/components/UserTable.vue +++ b/admin/src/components/UserTable.vue @@ -54,7 +54,7 @@ variant="info" size="md" :ref="'showing_detals_' + row.detailsShowing" - @click="rowDetailsToogle(row, row.item)" + @click="rowDetailsToogle(row, row.detailsShowing)" class="mr-2" > @@ -188,13 +188,25 @@ export default { } }, methods: { - rowDetailsToogle(row) { - if (this.$refs.showing_detals_false) { + rowDetailsToogle(row, details) { + console.log('row', row) + console.log('details', details) + + if (details) { row.toggleDetails() } - if (this.$refs.showing_detals_true) { - this.$refs.showing_detals_true.click() - } + if (!details) { + row.toggleDetails() + if ( this.$refs.showing_detals_true !== undefined) { + this.$refs.showing_detals_true.click() + } + } + //else { + // if (this.$refs.showing_detals_true) { + // this.$refs.showing_detals_true.click() + // } + // row.toggleDetails() + //} }, overlayShow(bookmarkType, item) { this.overlay = true