diff --git a/vue/src/components/JobsList.vue b/vue/src/components/JobsList.vue index b76258dc..ef9e1e68 100644 --- a/vue/src/components/JobsList.vue +++ b/vue/src/components/JobsList.vue @@ -119,6 +119,7 @@ import PathNav from '@/components/PathNav' import Program from '@/components/Program' import { matchKeywords, includesAll } from '@/runs' import SearchInput from '@/components/SearchInput' +import store from '@/store.js' import TriangleIcon from '@/components/icons/TriangleIcon' import WordsInput from '@/components/WordsInput' @@ -182,9 +183,9 @@ export default { data() { return { + store, loading: true, allJobs: [], - expand: {}, } }, @@ -206,10 +207,14 @@ export default { fetch(url) .then((response) => response.json()) .then((response) => response.forEach((j) => v.allJobs.push(j))) - .then(() => { this.expandAll(false); this.loading = false }) + .then(() => { this.loading = false }) }, computed: { + expand() { + return this.store.state.jobsExpand + }, + /** Jobs after applying the filter. */ visibleJobs() { var jobs = filter(this.allJobs, job => !job.ad_hoc) diff --git a/vue/src/store.js b/vue/src/store.js index c55b7e59..56eeef01 100644 --- a/vue/src/store.js +++ b/vue/src/store.js @@ -44,6 +44,9 @@ class Store { // User-selected time zone. timeZone: 'UTC', + + // Expand state in the job tree. + jobsExpand: {}, } setTime(time) {