1
0
forked from test/crm

fix: made pinned views active in sidebar

This commit is contained in:
Shariq Ansari 2024-01-02 13:00:32 +05:30
parent 5147a22adc
commit 37711aa5a4

View File

@ -32,9 +32,10 @@
<script setup>
import { Tooltip } from 'frappe-ui'
import { computed } from 'vue'
import { useRouter } from 'vue-router'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
const props = defineProps({
icon: {
@ -63,6 +64,9 @@ function handleClick() {
}
let isActive = computed(() => {
return router.currentRoute.value.name === props.to
if (route.query.view) {
return route.query.view == props.to?.query?.view
}
return route.name === props.to
})
</script>