Skip to content

Commit

Permalink
pass topic ref as descendant when init'ing useBaseSearch in resources…
Browse files Browse the repository at this point in the history
…election; search unconditionally
  • Loading branch information
nucleogenesis committed Nov 14, 2024
1 parent d3ad0f9 commit 51f196c
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@
import get from 'lodash/get';
import uniqWith from 'lodash/uniqWith';
import isEqual from 'lodash/isEqual';
import flatMap from 'lodash/flatMap';
import { useMemoize } from '@vueuse/core';
import {
displaySectionTitle,
Expand Down Expand Up @@ -234,11 +233,6 @@
},
mixins: [commonCoreStrings],
setup(props, context) {
const { searchTerms, search } = useBaseSearch({});
// Search if we already have search terms when we load up
if (flatMap(searchTerms.value, term => Object.keys(term)).length) {
search();
}
const store = getCurrentInstance().proxy.$store;
const route = computed(() => store.state.route);
const topicId = computed(() => route.value.params.topic_id);
Expand Down Expand Up @@ -496,6 +490,9 @@
loadingMore,
} = useQuizResources({ topicId, practiceQuiz: selectPracticeQuiz.value });
const { searchTerms, search } = useBaseSearch({ descendant: topic });
search();
const _loading = ref(true);
const channels = ref([]);
Expand Down

0 comments on commit 51f196c

Please sign in to comment.