From 299458a09c72c9c02718c1706f26d5ec55f22b79 Mon Sep 17 00:00:00 2001 From: Corey Ogburn Date: Mon, 13 Jan 2025 10:51:54 -0700 Subject: [PATCH] Simplify for Clarity and Correctness The state wasn't backwards, my understanding was. The button begins enabled and the table rows are visible, toggling it off removes the rows and shows only the packet data in order. NextTick isn't needed as the model is correct. I was wrong about the order of events with the last fix. --- html/js/routes/job.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/html/js/routes/job.js b/html/js/routes/job.js index 765a3199..addc52e6 100644 --- a/html/js/routes/job.js +++ b/html/js/routes/job.js @@ -149,13 +149,10 @@ routes.push({ path: '/job/:jobId', name: 'job', component: { return this.packetOptions.indexOf(option) != -1; }, captureLayoutAsStream() { - // wait for v-btn-toggle to update model - this.$nextTick(() => { - if (!this.isOptionEnabled('packets')) return; + if (this.isOptionEnabled('packets')) return; - this.expandPackets(true); - this.sortBy = [{ key: 'number', order: 'asc' }]; - }); + this.expandPackets(true); + this.sortBy = [{ key: 'number', order: 'asc' }]; }, packetsUpdated() { if (this.expandAll) {