Skip to content

Commit

Permalink
[ProjectDetail] fixed dataset request with slug (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmacielvieira authored Apr 18, 2024
1 parent 7458e03 commit 70eceb1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions metaspace/webapp/src/modules/Project/ViewProjectPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</template>

<script lang="ts">
import { defineComponent, ref, watch, onMounted, computed, inject } from 'vue'
import { defineComponent, ref, watch, onMounted, computed, inject, reactive } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useStore } from 'vuex'
import { ElButton, ElAlert, ElTabs, ElTabPane, ElLoading } from '../../lib/element-plus'
Expand Down Expand Up @@ -241,6 +241,8 @@ export default defineComponent({
}
})
const queryOptions = reactive({ enabled: false })
const {
result: dataResult,
onResult: onDataResult,
Expand All @@ -261,13 +263,11 @@ export default defineComponent({
${datasetDetailItemFragment}
`,
{
computed(() => ({
maxVisibleDatasets: maxVisibleDatasets.value,
projectId: projectId.value,
},
{
enabled: computed(() => projectId.value != null),
}
})),
queryOptions
)
onDataResult(() => {
setTimeout(() => {
Expand All @@ -278,7 +278,7 @@ export default defineComponent({
const { onResult } = useSubscription(datasetDeletedQuery)
onResult(({ data }) => {
onResult(({ data }: any) => {
if (data && data.datasetDeleted) {
removeDatasetFromAllDatasetsQuery('data', data.datasetDeleted.id)
}
Expand Down Expand Up @@ -407,6 +407,7 @@ export default defineComponent({
onMounted(() => {
initializeTab()
queryOptions.enabled = true
})
const refetch = async () => {
Expand Down

0 comments on commit 70eceb1

Please sign in to comment.