Skip to content

Commit

Permalink
revert to the __vkey__ bind for viewing datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Mar 5, 2024
1 parent 0dbc86c commit 56128b3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions client/src/components/History/Content/ContentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faCheckSquare, faSquare } from "@fortawesome/free-regular-svg-icons";
import { faArrowCircleDown, faArrowCircleUp, faCheckCircle, faSpinner } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BBadge, BButton, BCollapse } from "bootstrap-vue";
import { computed, ref } from "vue";
import { computed } from "vue";
import { useRoute, useRouter } from "vue-router/composables";
import type { ItemUrls } from "@/components/History/Content/Dataset/index";
Expand Down Expand Up @@ -76,8 +76,6 @@ const emit = defineEmits<{
const entryPointStore = useEntryPointStore();
const routeKey = ref(0);
const jobState = computed(() => {
return new JobStateSummary(props.item);
});
Expand Down Expand Up @@ -231,15 +229,11 @@ function onDisplay() {
window.open(url, "_blank");
} else {
// vue-router 4 supports a native force push with clean URLs,
// but we're using a workaround with a routeKey query parameter to force a reload.
// but we're using a __vkey__ bit as a workaround
// Only conditionally force to keep urls clean most of the time.
if (route.path === itemUrls.value.display) {
routeKey.value++;
router.push({
path: itemUrls.value.display,
query: { key: `${routeKey.value}` },
params: { title: props.name },
});
// @ts-ignore
router.push(itemUrls.value.display, { title: props.name, force: true });
} else if (itemUrls.value.display) {
router.push({ path: itemUrls.value.display, params: { title: props.name } });
}
Expand Down

0 comments on commit 56128b3

Please sign in to comment.