#7623 add updateRoute prop in VnPaginate #475

Merged
jorgep merged 12 commits from 7623-fix-redirection into dev 2024-06-26 12:22:00 +00:00
7 changed files with 11 additions and 13 deletions
Showing only changes of commit 3c810254a4 - Show all commits

View File

@ -60,7 +60,7 @@ const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
const arrayData = useArrayData($props.dataKey, { const arrayData = useArrayData($props.dataKey, {
exprBuilder: $props.exprBuilder, exprBuilder: $props.exprBuilder,
searchUrl: $props.searchUrl, searchUrl: $props.searchUrl,
navigate: {}, navigate: $props.redirect ? {} : null,
}); });
const route = useRoute(); const route = useRoute();
const store = arrayData.store; const store = arrayData.store;

View File

@ -77,8 +77,8 @@ async function insert() {
auto-load auto-load
ref="vnPaginateRef" ref="vnPaginateRef"
class="show" class="show"
:update-router="false"
v-bind="$attrs" v-bind="$attrs"
search-url="notes"
> >
<template #body="{ rows }"> <template #body="{ rows }">
<TransitionGroup name="list" tag="div" class="column items-center full-width"> <TransitionGroup name="list" tag="div" class="column items-center full-width">

View File

@ -66,10 +66,6 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
updateRouter: {
type: Boolean,
default: true,
},
}); });
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']); const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
@ -124,7 +120,7 @@ async function fetch(params) {
useArrayData(props.dataKey, params); useArrayData(props.dataKey, params);
store.filter.skip = 0; store.filter.skip = 0;
store.skip = 0; store.skip = 0;
await arrayData.fetch({ append: false, updateRouter: props.updateRouter }); await arrayData.fetch({ append: false });
if (!store.hasMoreData) { if (!store.hasMoreData) {
isLoading.value = false; isLoading.value = false;
} }

View File

@ -219,6 +219,7 @@ const useLang = (values) => {
:expr-builder="exprBuilder" :expr-builder="exprBuilder"
:custom-tags="['tagGroups']" :custom-tags="['tagGroups']"
@remove="clearFilter" @remove="clearFilter"
:redirect="false"
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<strong v-if="tag.label === 'categoryFk'"> <strong v-if="tag.label === 'categoryFk'">

View File

@ -70,7 +70,6 @@ function extractValueTags(items) {
:user-params="catalogParams" :user-params="catalogParams"
auto-load auto-load
@on-fetch="extractTags" @on-fetch="extractTags"
:update-router="false"
> >
<template #body="{ rows }"> <template #body="{ rows }">
<div class="catalog-list"> <div class="catalog-list">

View File

@ -45,7 +45,7 @@ const reportParams = computed(() => ({
})); }));
async function getSupplierConsumptionData() { async function getSupplierConsumptionData() {
await arrayData.fetch({ append: false, updateRouter: false }); await arrayData.fetch({ append: false });
} }
const rows = computed(() => { const rows = computed(() => {
@ -166,10 +166,12 @@ onMounted(async () => {
</div> </div>
</div> </div>
</Teleport> </Teleport>
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
<SupplierConsumptionFilter data-key="SupplierConsumption" />
</Teleport>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
<SupplierConsumptionFilter data-key="SupplierConsumption" />
</QScrollArea>
</QDrawer>
<QTable <QTable
:rows="rows" :rows="rows"
row-key="id" row-key="id"

View File

@ -50,7 +50,7 @@ const itemCategoriesOptions = ref([]);
@on-fetch="(data) => (itemCategoriesOptions = data)" @on-fetch="(data) => (itemCategoriesOptions = data)"
auto-load auto-load
/> />
<VnFilterPanel :data-key="props.dataKey" :search-button="true"> <VnFilterPanel :data-key="props.dataKey" :search-button="true" :redirect="false">
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong> <strong>{{ t(`params.${tag.label}`) }}: </strong>