fix: update top header list title when saving a filter
See https://community.vikunja.io/t/changes-to-a-saved-filter-name-is-not-updated-in-the-page-title
This commit is contained in:
parent
5b606936c3
commit
fd3c15d064
1 changed files with 4 additions and 0 deletions
|
@ -54,9 +54,11 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, shallowRef, computed, watch, unref } from 'vue'
|
import {ref, shallowRef, computed, watch, unref } from 'vue'
|
||||||
import {useRouter, useRoute} from 'vue-router'
|
import {useRouter, useRoute} from 'vue-router'
|
||||||
|
import {useStore} from '@/store'
|
||||||
import {success} from '@/message'
|
import {success} from '@/message'
|
||||||
import {useI18n} from 'vue-i18n'
|
import {useI18n} from 'vue-i18n'
|
||||||
import type {MaybeRef} from '@vueuse/core'
|
import type {MaybeRef} from '@vueuse/core'
|
||||||
|
import {CURRENT_LIST} from '@/store/mutation-types'
|
||||||
|
|
||||||
import {default as Editor} from '@/components/input/AsyncEditor'
|
import {default as Editor} from '@/components/input/AsyncEditor'
|
||||||
import CreateEdit from '@/components/misc/create-edit.vue'
|
import CreateEdit from '@/components/misc/create-edit.vue'
|
||||||
|
@ -113,6 +115,7 @@ function useSavedFilter(listId: MaybeRef<IList['id']>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
const store = useStore()
|
||||||
const listId = computed(() => Number(route.params.listId as string))
|
const listId = computed(() => Number(route.params.listId as string))
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -126,6 +129,7 @@ const router = useRouter()
|
||||||
|
|
||||||
async function saveSavedFilter() {
|
async function saveSavedFilter() {
|
||||||
await save()
|
await save()
|
||||||
|
await store.dispatch(CURRENT_LIST, {list: filter})
|
||||||
router.back()
|
router.back()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue