Skip to content

Commit

Permalink
fix eternal loading state when navigation routes
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Nov 16, 2023
1 parent e621f66 commit 1ceee06
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,28 @@
>
<!-- TODO This should be a separate component like "empty section container" or something -->
<div v-if="!quizForge.activeQuestions.value.length" class="no-question-style">
<KGrid class="questions-list-label-row">
<KGridItem
class="right-side-heading"
style="padding: 0.7em 0.75em;"
>
<KButton
primary
:text="coreString('optionsLabel')"
>
<template #menu>
<KDropdownMenu
:primary="false"
:disabled="false"
:hasIcons="true"
:options="activeSectionActions"
@tab="e => (e.preventDefault() || $refs.selectAllCheckbox.focus())"
@select="handleActiveSectionAction"
/>
</template>
</KButton>
</KGridItem>
</KGrid>
<div class="question-mark-layout">
<span class="help-icon-style">?</span>
</div>
Expand Down Expand Up @@ -439,9 +461,6 @@
];
},
},
mounted() {
this.$store.dispatch('notLoading');
},
methods: {
handleReplaceSelection() {
const section_id = get(this.quizForge.activeSection).section_id;
Expand All @@ -454,7 +473,6 @@
this.$router.replace({ path: 'new/' + section_id + '/edit' });
break;
case this.deleteSectionLabel$():
console.log('Deleting, ', this.quizForge.activeSection.value.section_id);
this.quizForge.removeSection(this.quizForge.activeSection.value.section_id);
this.focusActiveSectionTab();
break;
Expand Down Expand Up @@ -698,7 +716,7 @@
}
/deep/ .overflow-tabs svg {
top: 7px !important;
top: 5px !important;
}
.select-all-box {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
},
},
watch: {
$route: function() {
// FIXME Coach shouldn't be setting loading in a beforeEach here maybe?
this.$store.dispatch('notLoading');
},
filters(newVal) {
this.$router.push({
query: { ...this.$route.query, ...pickBy(newVal) },
Expand Down

0 comments on commit 1ceee06

Please sign in to comment.