#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, {
exprBuilder: $props.exprBuilder,
searchUrl: $props.searchUrl,
navigate: {},
navigate: $props.redirect ? {} : null,
});
const route = useRoute();
const store = arrayData.store;

View File

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

View File

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

View File

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

View File

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

View File

@ -45,7 +45,7 @@ const reportParams = computed(() => ({
}));
async function getSupplierConsumptionData() {
await arrayData.fetch({ append: false, updateRouter: false });
await arrayData.fetch({ append: false });
}
const rows = computed(() => {
@ -166,10 +166,12 @@ onMounted(async () => {
</div>
</div>
</Teleport>
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
<SupplierConsumptionFilter data-key="SupplierConsumption" />
</Teleport>
<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
:rows="rows"
row-key="id"

View File

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