0
0
Fork 0

fix: bug replace

This commit is contained in:
Alex Moreno 2024-06-17 11:29:36 +02:00
parent a479637ee6
commit fb1bd5ca72
3 changed files with 9 additions and 3 deletions

View File

@ -67,6 +67,10 @@ const $props = defineProps({
default: '',
description: 'It is used for redirect on click "save and continue"',
},
hasSubtoolbar: {
type: Boolean,
default: true,
},
});
const isLoading = ref(false);
@ -310,7 +314,7 @@ watch(formUrl, async () => {
</template>
</VnPaginate>
<SkeletonTable v-if="!formData" :columns="$attrs.columns?.length" />
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubtoolbar">
<QBtnGroup push style="column-gap: 10px">
<slot name="moreBeforeActions" />
<QBtn

View File

@ -53,7 +53,7 @@ const $props = defineProps({
},
isEditable: {
type: Boolean,
default: null,
default: false,
},
useModel: {
type: Boolean,
@ -220,6 +220,7 @@ defineExpose({
:search-url="searchUrl"
:disable-infinite-scroll="mode == 'table'"
@save-changes="reload"
:has-subtoolbar="isEditable"
>
<template #body="{ rows }">
<QTable

View File

@ -1,4 +1,4 @@
import { onMounted, ref, computed, onUnmounted } from 'vue';
import { onMounted, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import axios from 'axios';
import { useArrayDataStore } from 'stores/useArrayDataStore';
@ -221,6 +221,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const pushUrl = { path: to };
if (to.endsWith('/list') || to.endsWith('/'))
pushUrl.query = newUrl.query;
destroy();
return router.push(pushUrl);
}
}